diff --git a/.distignore b/.distignore
new file mode 100644
index 000000000..c81c34c70
--- /dev/null
+++ b/.distignore
@@ -0,0 +1,42 @@
+.git
+.github
+.idea
+.wordpress-org
+build
+build-cs
+build-phpunit
+docs
+node_modules
+patches
+test-content
+tests
+
+*.DS_Store
+.DS_Store
+.distignore
+.editorconfig
+.eslintrc.js
+.gitattributes
+.gitignore
+.nvmrc
+.phpunit.result.cache
+.wp-env.json
+.wp-env.override.json
+behat.yml
+CODE_OF_CONDUCT.md
+codecov.yml
+composer.json
+composer.lock
+CONTRIBUTING.md
+package.json
+package-lock.json
+phpcs.xml
+phpcs.xml.dist
+phpmd.xml
+phpstan.neon
+phpstan.neon.dist
+phpunit.xml
+phpunit.xml.dist
+plugin-check.iml
+README.md
+SECURITY.md
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index e451b5d1f..3db501ae7 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -14,6 +14,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
+ - name: Install PHP dependencies
+ uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6
+ with:
+ composer-options: '--prefer-dist --no-progress --no-interaction --no-dev'
+
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
diff --git a/assets/js/plugin-check-admin.js b/assets/js/plugin-check-admin.js
index 8f2750bca..b091e5c82 100644
--- a/assets/js/plugin-check-admin.js
+++ b/assets/js/plugin-check-admin.js
@@ -89,7 +89,7 @@
/**
* Reset the results container.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
function resetResults() {
// Empty the results container.
@@ -99,7 +99,7 @@
/**
* Resets the form controls once checks have completed or failed.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
function resetForm() {
spinner.classList.remove( 'is-active' );
@@ -113,7 +113,7 @@
/**
* Setup the runtime environment if needed.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {Object} data Data object with props passed to form data.
*/
@@ -153,7 +153,7 @@
/**
* Cleanup the runtime environment.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return {Object} The response data.
*/
@@ -186,7 +186,7 @@
/**
* Get the Checks to run.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
function getChecksToRun() {
const pluginCheckData = new FormData();
@@ -230,7 +230,7 @@
/**
* Run Checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {Object} data The response data.
*/
@@ -259,7 +259,7 @@
/**
* Renders result message.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {boolean} isSuccessMessage Whether the message is a success message.
*/
@@ -279,7 +279,7 @@
/**
* Run a single check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {string} plugin The plugin to check.
* @param {string} check The check to run.
@@ -314,7 +314,7 @@
/**
* Handles any errors in the data returned from the response.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {Object} data The response data.
* @return {Object} The response data.
@@ -340,7 +340,7 @@
/**
* Renders results for each check on the page.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {Object} results The results object.
*/
@@ -365,7 +365,7 @@
/**
* Renders the file results table.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {string} file The file name for the results.
* @param {Object} errors The file errors.
@@ -397,7 +397,7 @@
/**
* Checks if there are any links in the results object.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {Object} results The results object.
* @return {boolean} True if there are links, false otherwise.
@@ -418,7 +418,7 @@
/**
* Renders a result row onto the file table.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {string} type The result type. Either ERROR or WARNING.
* @param {Object} results The results object.
@@ -454,7 +454,7 @@
/**
* Renders the template with data.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param {string} templateSlug The template slug
* @param {Object} data Template data.
diff --git a/cli.php b/cli.php
index 7baf1491f..d8ff7b01b 100644
--- a/cli.php
+++ b/cli.php
@@ -5,12 +5,12 @@
* This is necessary to setup the environment to perform runtime checks.
*
* @package plugin-check
- * @since n.e.x.t
+ * @since 1.0.0
*/
use WordPress\Plugin_Check\Checker\CLI_Runner;
-use WordPress\Plugin_Check\Plugin_Context;
use WordPress\Plugin_Check\CLI\Plugin_Check_Command;
+use WordPress\Plugin_Check\Plugin_Context;
if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
return;
@@ -40,14 +40,14 @@
/**
* Adds hook to set up the object-cache.php drop-in file.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
WP_CLI::add_hook(
'before_wp_load',
- function() {
+ function () {
if ( CLI_Runner::is_plugin_check() ) {
if ( ! file_exists( ABSPATH . 'wp-content/object-cache.php' ) ) {
- if ( ! copy( __DIR__ . '/drop-ins/object-cache.copy.php', ABSPATH . 'wp-content/object-cache.php' ) ) {
+ if ( ! copy( __DIR__ . '/drop-ins/object-cache.copy.php', ABSPATH . 'wp-content/object-cache.php' ) ) {
WP_CLI::error( 'Unable to copy object-cache.php file.' );
}
}
diff --git a/docs/README.md b/docs/README.md
index f0ffa57b7..de9cf4168 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -4,3 +4,4 @@
* [Creating a Static Check](creating-a-static-check.md)
* [Creating a Runtime Check](creating-a-runtime-check.md)
* [CLI Commands](CLI.md)
+* [Releasing a New Version of Plugin](releasing.md)
diff --git a/docs/creating-a-static-check.md b/docs/creating-a-static-check.md
index 3cedf5deb..0b7674c77 100644
--- a/docs/creating-a-static-check.md
+++ b/docs/creating-a-static-check.md
@@ -53,7 +53,7 @@ class My_Custom_Check extends Abstract_PHP_CodeSniffer_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -88,7 +88,7 @@ use WordPress\Plugin_Check\Traits\Stable_Check;
/**
* Check for detecting incorrect casing of the term "WordPress" (specifically "Wordpress") using string search in files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class My_Custom_Check extends Abstract_File_Check {
@@ -99,7 +99,7 @@ class My_Custom_Check extends Abstract_File_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -110,7 +110,7 @@ class My_Custom_Check extends Abstract_File_Check {
/**
* Check the "Wordpress" in files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param array $files Array of plugin files.
@@ -160,7 +160,7 @@ Below is an example demonstrating how to access the plugin context and add messa
/**
* Runs the check on the plugin and amends results.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check results to amend and the plugin context.
*/
diff --git a/docs/releasing.md b/docs/releasing.md
new file mode 100644
index 000000000..bb4e95238
--- /dev/null
+++ b/docs/releasing.md
@@ -0,0 +1,36 @@
+[Back to overview](./README.md)
+
+# Releasing a New Version of Plugin
+
+This project uses a [GitHub Action workflow](../.github/workflows/deploy.yml) for automatically deploying
+stable releases of Plugin Check to the [WordPress plugin directory](https://wordpress.org/plugins/plugin-check/), so there is no manual build step involved.
+
+Follow these steps:
+
+1. Bump the `Version` field in the main plugin file's header.
+2. Bump `WP_PLUGIN_CHECK_VERSION` in the same file.
+3. Bump the `Stable tag` field in the `readme.txt` file.
+4. Update the changelog in `readme.txt`.
+5. Commit this to the default branch.
+6. On GitHub, go to "Releases" and create a new release.
+7. Once published, this release will be automatically deployed to the plugin directory.
+
+## Building the Plugin
+
+If you would like to manually replicate the build process locally, you can do so
+using the [`wp dist-archive` WP-CLI command](https://github.com/wp-cli/dist-archive-command/).
+In your terminal, you can run this in the directory where you checked out this repository:
+
+```
+# Ensure PHPCS is installed, as it is required for some of the checks.
+composer install --no-dev
+# Build the ZIP file.
+wp dist-archive . /path/to/write/the/plugin-check.zip
+```
+
+Note: you might first need to install the WP-CLI command if it's not yet available:
+
+```
+wp package install wp-cli/dist-archive-command
+```
+
diff --git a/drop-ins/object-cache.copy.php b/drop-ins/object-cache.copy.php
index 81c489d9a..5973d5d2e 100644
--- a/drop-ins/object-cache.copy.php
+++ b/drop-ins/object-cache.copy.php
@@ -19,7 +19,7 @@
* be using, and it is implemented in a way that there is no risk for breakage.
*
* @package plugin-check
- * @since n.e.x.t
+ * @since 1.0.0
*/
// Set constant to be able to later check for whether this file was loaded.
diff --git a/includes/Admin/Admin_AJAX.php b/includes/Admin/Admin_AJAX.php
index 60c177795..e202b03e1 100644
--- a/includes/Admin/Admin_AJAX.php
+++ b/includes/Admin/Admin_AJAX.php
@@ -17,14 +17,14 @@
/**
* Class to handle the Admin AJAX requests.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
final class Admin_AJAX {
/**
* Nonce key.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
const NONCE_KEY = 'plugin-check-run-checks';
@@ -32,7 +32,7 @@ final class Admin_AJAX {
/**
* Clean up Runtime Environment action name.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
const ACTION_CLEAN_UP_ENVIRONMENT = 'plugin_check_clean_up_environment';
@@ -40,7 +40,7 @@ final class Admin_AJAX {
/**
* Set up Runtime Environment action name.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
const ACTION_SET_UP_ENVIRONMENT = 'plugin_check_set_up_environment';
@@ -48,7 +48,7 @@ final class Admin_AJAX {
/**
* Get Checks to run action name.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
const ACTION_GET_CHECKS_TO_RUN = 'plugin_check_get_checks_to_run';
@@ -56,7 +56,7 @@ final class Admin_AJAX {
/**
* Run Checks action name.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
const ACTION_RUN_CHECKS = 'plugin_check_run_checks';
@@ -64,7 +64,7 @@ final class Admin_AJAX {
/**
* Registers WordPress hooks for the Admin AJAX.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function add_hooks() {
add_action( 'wp_ajax_' . self::ACTION_CLEAN_UP_ENVIRONMENT, array( $this, 'clean_up_environment' ) );
@@ -76,7 +76,7 @@ public function add_hooks() {
/**
* Creates and returns the nonce.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function get_nonce() {
return wp_create_nonce( self::NONCE_KEY );
@@ -85,7 +85,7 @@ public function get_nonce() {
/**
* Handles the AJAX request to setup the runtime environment if needed.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function set_up_environment() {
// Verify the nonce before continuing.
@@ -144,7 +144,7 @@ public function set_up_environment() {
/**
* Handles the AJAX request to cleanup the runtime environment.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function clean_up_environment() {
global $wpdb, $table_prefix;
@@ -181,7 +181,7 @@ public function clean_up_environment() {
/**
* Handles the AJAX request that returns the checks to run.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function get_checks_to_run() {
// Verify the nonce before continuing.
@@ -235,7 +235,7 @@ public function get_checks_to_run() {
/**
* Run checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function run_checks() {
// Verify the nonce before continuing.
@@ -286,7 +286,7 @@ public function run_checks() {
/**
* Verify the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $nonce The request nonce passed.
* @return bool|WP_Error True if the nonce is valid. WP_Error if invalid.
@@ -306,7 +306,7 @@ private function verify_request( $nonce ) {
/**
* Check for a Runtime_Check in a list of checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $checks An array of Check instances.
* @return bool True if a Runtime_Check exists in the array, false if not.
diff --git a/includes/Admin/Admin_Page.php b/includes/Admin/Admin_Page.php
index ca6f48e4f..7d0a93d27 100644
--- a/includes/Admin/Admin_Page.php
+++ b/includes/Admin/Admin_Page.php
@@ -12,14 +12,14 @@
/**
* Class is handling admin tools page functionality.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
final class Admin_Page {
/**
* Admin AJAX class instance.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Admin_AJAX
*/
protected $admin_ajax;
@@ -27,7 +27,7 @@ final class Admin_Page {
/**
* Admin page hook suffix.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $hook_suffix = '';
@@ -35,7 +35,7 @@ final class Admin_Page {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Admin_AJAX $admin_ajax Instance of Admin_AJAX.
*/
@@ -46,7 +46,7 @@ public function __construct( Admin_AJAX $admin_ajax ) {
/**
* Registers WordPress hooks for the admin page.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function add_hooks() {
add_action( 'admin_menu', array( $this, 'add_and_initialize_page' ) );
@@ -59,7 +59,7 @@ public function add_hooks() {
/**
* Adds the admin page under the tools menu.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function add_page() {
$this->hook_suffix = add_management_page(
@@ -74,7 +74,7 @@ public function add_page() {
/**
* Adds and initializes the admin page under the tools menu.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function add_and_initialize_page() {
$this->add_page();
@@ -84,7 +84,7 @@ public function add_and_initialize_page() {
/**
* Initializes page hooks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function initialize_page() {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
@@ -94,7 +94,7 @@ public function initialize_page() {
/**
* Loads the check's script.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function enqueue_scripts() {
wp_enqueue_script(
@@ -127,7 +127,7 @@ public function enqueue_scripts() {
/**
* Enqueue a script in the WordPress admin on plugin-editor.php.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $hook_suffix The current admin page.
*/
@@ -162,7 +162,7 @@ public function add_jump_to_line_code_editor( $hook_suffix ) {
/**
* Returns the list of plugins.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array List of available plugins.
*/
@@ -185,7 +185,7 @@ private function get_available_plugins() {
/**
* Renders the "Plugin Check" page.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
*/
@@ -206,7 +206,7 @@ public function render_page() {
/**
* Adds "check this plugin" link in the plugins list table.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $actions List of actions.
* @param string $plugin_file Plugin main file.
@@ -237,7 +237,7 @@ public function filter_plugin_action_links( $actions, $plugin_file, $plugin_data
/**
* Render the results table templates in the footer.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function admin_footer() {
ob_start();
@@ -293,7 +293,7 @@ public function admin_footer() {
/**
* Gets the hook suffix under which the admin page is added.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string Hook suffix, or empty string if admin page was not added.
*/
diff --git a/includes/CLI/Plugin_Check_Command.php b/includes/CLI/Plugin_Check_Command.php
index 5de5bef64..ca8813eff 100644
--- a/includes/CLI/Plugin_Check_Command.php
+++ b/includes/CLI/Plugin_Check_Command.php
@@ -26,7 +26,7 @@ final class Plugin_Check_Command {
/**
* Plugin context.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Plugin_Context
*/
protected $plugin_context;
@@ -34,7 +34,7 @@ final class Plugin_Check_Command {
/**
* Output format type.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string[]
*/
protected $output_formats = array(
@@ -46,7 +46,7 @@ final class Plugin_Check_Command {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Plugin_Context $plugin_context Plugin context.
*/
@@ -106,7 +106,7 @@ public function __construct( Plugin_Context $plugin_context ) {
*
* @subcommand check
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $args List of the positional arguments.
* @param array $assoc_args List of the associative arguments.
@@ -266,7 +266,7 @@ static function ( $dirs ) use ( $excluded_directories ) {
*
* @subcommand list-checks
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $args List of the positional arguments.
* @param array $assoc_args List of the associative arguments.
@@ -352,7 +352,7 @@ public function list_checks( $args, $assoc_args ) {
*
* @subcommand list-check-categories
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $args List of the positional arguments.
* @param array $assoc_args List of the associative arguments.
@@ -382,7 +382,7 @@ public function list_check_categories( $args, $assoc_args ) {
/**
* Returns check categories details.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array List of the check categories.
*/
@@ -405,7 +405,7 @@ private function get_check_categories() {
/**
* Validates the associative arguments.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $assoc_args List of the associative arguments.
* @param array $defaults List of the default arguments.
@@ -432,7 +432,7 @@ private function get_options( $assoc_args, $defaults ) {
/**
* Gets the formatter instance to format check results.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $assoc_args Associative arguments.
* @param array $default_fields Default fields.
@@ -452,7 +452,7 @@ private function get_formatter( $assoc_args, $default_fields ) {
/**
* Returns check default fields.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $assoc_args Associative arguments.
* @return array Default fields.
@@ -482,7 +482,7 @@ private function get_check_default_fields( $assoc_args ) {
/**
* Flattens and combines the given associative array of file errors and file warnings into a two-dimensional array.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $file_errors Errors from a Check_Result, for a specific file.
* @param array $file_warnings Warnings from a Check_Result, for a specific file.
@@ -550,7 +550,7 @@ static function ( $a, $b ) {
/**
* Displays the results.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param WP_CLI\Formatter $formatter Formatter class.
* @param string $file_name File name.
@@ -573,7 +573,7 @@ private function display_results( $formatter, $file_name, $file_results ) {
/**
* Checks for a Runtime_Check in a list of checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $checks An array of Check instances.
* @return bool True if a Runtime_Check exists in the array, false if not.
diff --git a/includes/Checker/AJAX_Runner.php b/includes/Checker/AJAX_Runner.php
index 467f2dc29..90613a934 100644
--- a/includes/Checker/AJAX_Runner.php
+++ b/includes/Checker/AJAX_Runner.php
@@ -12,14 +12,14 @@
/**
* AJAX Runner class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class AJAX_Runner extends Abstract_Check_Runner {
/**
* An instance of the Checks class.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Checks
*/
protected $checks;
@@ -27,7 +27,7 @@ class AJAX_Runner extends Abstract_Check_Runner {
/**
* Checks if the current request is an AJAX request for the Plugin Checker.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool Returns true if is an AJAX request for the plugin check else false.
*/
@@ -48,7 +48,7 @@ public static function is_plugin_check() {
/**
* Returns the plugin parameter based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The plugin parameter.
*
@@ -71,7 +71,7 @@ protected function get_plugin_param() {
/**
* Returns an array of Check slugs to run based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of Check slugs to run.
*/
@@ -85,7 +85,7 @@ protected function get_check_slugs_param() {
/**
* Returns an array of Check slugs to exclude based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of Check slugs to exclude.
*/
@@ -99,7 +99,7 @@ protected function get_check_exclude_slugs_param() {
/**
* Returns the include experimental parameter based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool Returns true to include experimental checks else false.
*/
@@ -110,7 +110,7 @@ protected function get_include_experimental_param() {
/**
* Returns an array of categories for filtering the checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of categories for filtering the checks.
*/
diff --git a/includes/Checker/Abstract_Check_Runner.php b/includes/Checker/Abstract_Check_Runner.php
index a04d74fcd..df8f707ab 100644
--- a/includes/Checker/Abstract_Check_Runner.php
+++ b/includes/Checker/Abstract_Check_Runner.php
@@ -14,7 +14,7 @@
/**
* Abstract Check Runner class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
*/
@@ -23,7 +23,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* True if the class was initialized early in the WordPress load process.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var bool
*/
protected $initialized_early;
@@ -31,7 +31,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* The check slugs to run.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $check_slugs;
@@ -39,7 +39,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* The check slugs to exclude.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $check_exclude_slugs;
@@ -47,7 +47,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* The plugin parameter.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $plugin;
@@ -55,7 +55,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* An instance of the Checks class.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Checks
*/
protected $checks;
@@ -63,7 +63,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* The plugin basename to check.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $plugin_basename;
@@ -71,7 +71,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* An instance of the Check_Repository.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Check_Repository
*/
private $check_repository;
@@ -79,7 +79,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* Runtime environment.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Runtime_Environment_Setup
*/
protected $runtime_environment;
@@ -87,7 +87,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* Whether to include experimental checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var bool
*/
protected $include_experimental;
@@ -95,7 +95,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* Checks category for the filter.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $check_categories;
@@ -103,7 +103,7 @@ abstract class Abstract_Check_Runner implements Check_Runner {
/**
* Returns the plugin parameter based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The plugin parameter from the request.
*/
@@ -112,7 +112,7 @@ abstract protected function get_plugin_param();
/**
* Returns an array of Check slugs to run based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of Check slugs.
*/
@@ -121,7 +121,7 @@ abstract protected function get_check_slugs_param();
/**
* Returns an array of Check slugs to exclude based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of Check slugs.
*/
@@ -130,7 +130,7 @@ abstract protected function get_check_exclude_slugs_param();
/**
* Returns the include experimental parameter based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool Returns true to include experimental checks else false.
*/
@@ -139,7 +139,7 @@ abstract protected function get_include_experimental_param();
/**
* Returns an array of categories for filtering the checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of categories.
*/
@@ -148,7 +148,7 @@ abstract protected function get_categories_param();
/**
* Sets whether the runner class was initialized early.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
final public function __construct() {
$this->initialized_early = ! did_action( 'muplugins_loaded' );
@@ -159,7 +159,7 @@ final public function __construct() {
/**
* Sets the check slugs to be run.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs An array of check slugs to be run.
*
@@ -181,7 +181,7 @@ final public function set_check_slugs( array $check_slugs ) {
/**
* Sets the check slugs to be excluded.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs An array of check slugs to be excluded.
*
@@ -203,7 +203,7 @@ final public function set_check_exclude_slugs( array $check_slugs ) {
/**
* Sets the plugin slug or basename to be checked.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $plugin The plugin slug or basename to be checked.
*
@@ -225,7 +225,7 @@ final public function set_plugin( $plugin ) {
/**
* Sets whether to include experimental checks in the process.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param bool $include_experimental True to include experimental checks. False to exclude.
*
@@ -250,7 +250,7 @@ final public function set_experimental_flag( $include_experimental ) {
/**
* Sets categories for filtering the checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $categories An array of categories for filtering.
*
@@ -274,7 +274,7 @@ final public function set_categories( $categories ) {
/**
* Prepares the environment for running the requested checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert any changes made here.
*
@@ -292,7 +292,7 @@ final public function prepare() {
/**
* Runs the checks against the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Check_Result An object containing all check results.
*/
@@ -333,7 +333,7 @@ final public function run() {
/**
* Determines if any of the checks are a runtime check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $checks An array of check instances to run.
* @return bool Returns true if one or more checks is a runtime check.
@@ -351,7 +351,7 @@ private function has_runtime_check( array $checks ) {
/**
* Returns all shared preparations used by the checks to run.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $checks An array of Check instances to run.
* @return array An array of Preparations to run where each item is an array with keys `class` and `args`.
@@ -384,7 +384,7 @@ private function get_shared_preparations( array $checks ) {
/**
* Returns the Check instances to run.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array map of check slugs to Check instances.
*
@@ -426,7 +426,7 @@ final public function get_checks_to_run() {
/**
* Creates and returns the Check instance.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Checks An instance of the Checks class.
*
@@ -445,7 +445,7 @@ protected function get_checks_instance() {
/**
* Returns the check slugs to run.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of check slugs to run.
*/
@@ -460,7 +460,7 @@ private function get_check_slugs() {
/**
* Returns the check slugs to exclude.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of check slugs to exclude.
*/
@@ -475,7 +475,7 @@ private function get_check_exclude_slugs() {
/**
* Returns the plugin basename.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The plugin basename to check.
*/
@@ -491,7 +491,7 @@ final public function get_plugin_basename() {
/**
* Returns the value for the include experimental flag.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool True if experimental checks are included. False if not.
*/
@@ -506,7 +506,7 @@ final protected function get_include_experimental() {
/**
* Returns an array of categories for filtering the checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of categories.
*/
@@ -520,7 +520,7 @@ final protected function get_categories() {
/** Gets the Check_Context for the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Check_Context The check context for the plugin file.
*/
@@ -531,7 +531,7 @@ private function get_check_context() {
/**
* Sets the runtime environment setup.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Runtime_Environment_Setup $runtime_environment_setup Runtime environment instance.
*/
diff --git a/includes/Checker/CLI_Runner.php b/includes/Checker/CLI_Runner.php
index db0cbdd1c..3d65c5c6a 100644
--- a/includes/Checker/CLI_Runner.php
+++ b/includes/Checker/CLI_Runner.php
@@ -12,14 +12,14 @@
/**
* CLI Runner class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class CLI_Runner extends Abstract_Check_Runner {
/**
* An instance of the Checks class.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Checks
*/
protected $checks;
@@ -27,7 +27,7 @@ class CLI_Runner extends Abstract_Check_Runner {
/**
* Checks if the current request is a CLI request for the Plugin Checker.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool Returns true if is an CLI request for the plugin check else false.
*/
@@ -50,7 +50,7 @@ public static function is_plugin_check() {
/**
* Returns the plugin parameter based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The plugin parameter.
*
@@ -83,7 +83,7 @@ static function ( $val ) {
/**
* Returns an array of Check slugs to run based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of Check slugs to run.
*/
@@ -103,7 +103,7 @@ protected function get_check_slugs_param() {
/**
* Returns an array of Check slugs to exclude based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of Check slugs to run.
*/
@@ -123,7 +123,7 @@ protected function get_check_exclude_slugs_param() {
/**
* Returns the include experimental parameter based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool Returns true to include experimental checks else false.
*/
@@ -138,7 +138,7 @@ protected function get_include_experimental_param() {
/**
* Returns an array of categories for filtering the checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of categories.
*/
diff --git a/includes/Checker/Check.php b/includes/Checker/Check.php
index 9e74935a0..f8a13efb6 100644
--- a/includes/Checker/Check.php
+++ b/includes/Checker/Check.php
@@ -12,13 +12,13 @@
/**
* Interface for a single check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface Check {
/**
* Stability value for stable checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
const STABILITY_STABLE = 'STABLE';
@@ -26,7 +26,7 @@ interface Check {
/**
* Stability value for experimental checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
const STABILITY_EXPERIMENTAL = 'EXPERIMENTAL';
@@ -34,7 +34,7 @@ interface Check {
/**
* Returns the check's stability.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string One of the check stability constant values.
*/
@@ -43,7 +43,7 @@ public function get_stability();
/**
* Amends the given result by running the check on the associated plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
*
@@ -57,7 +57,7 @@ public function run( Check_Result $result );
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
diff --git a/includes/Checker/Check_Categories.php b/includes/Checker/Check_Categories.php
index 1c6b1d3d7..d9e1a9b8f 100644
--- a/includes/Checker/Check_Categories.php
+++ b/includes/Checker/Check_Categories.php
@@ -10,7 +10,7 @@
/**
* Check Categories class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Check_Categories {
@@ -24,7 +24,7 @@ class Check_Categories {
/**
* Returns an array of available categories.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of available categories.
*/
@@ -41,7 +41,7 @@ public static function get_categories() {
/**
* Returns an array of category labels.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An array of category labels.
*/
@@ -58,7 +58,7 @@ public static function get_category_labels() {
/**
* Returns an array of checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Collection $collection Check collection.
* @param array $categories An array of categories to filter by.
diff --git a/includes/Checker/Check_Collection.php b/includes/Checker/Check_Collection.php
index 0296b84c3..d6fb8290b 100644
--- a/includes/Checker/Check_Collection.php
+++ b/includes/Checker/Check_Collection.php
@@ -15,14 +15,14 @@
/**
* Check Collection interface.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface Check_Collection extends ArrayAccess, Countable, IteratorAggregate {
/**
* Returns the raw indexed array representation of this collection.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The indexed array of check objects.
*/
@@ -31,7 +31,7 @@ public function to_array(): array;
/**
* Returns the raw map of check slugs and their check objects as a representation of this collection.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array Map of `$check_slug => $check_obj` pairs.
*/
@@ -40,7 +40,7 @@ public function to_map(): array;
/**
* Returns a new check collection containing the subset of checks based on the given check filter function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @phpstan-param callable(Check,string): bool $filter_fn
*
@@ -55,7 +55,7 @@ public function filter( callable $filter_fn ): Check_Collection;
*
* If the given list is empty, the same collection will be returned without any change.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs List of slugs to limit to only those. If empty, the same collection is returned.
* @return Check_Collection New check collection, effectively a subset of this one.
@@ -67,7 +67,7 @@ public function include( array $check_slugs ): Check_Collection;
*
* If the given list is empty, the same collection will be returned without any change.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs List of slugs to exclude. If empty, the same collection is returned.
* @return Check_Collection New check collection, effectively a subset of this one.
@@ -77,7 +77,7 @@ public function exclude( array $check_slugs ): Check_Collection;
/**
* Throws an exception if any of the given check slugs are not present, or returns the same collection otherwise.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs List of slugs to limit to only those. If empty, the same collection is returned.
* @return Check_Collection The unchanged check collection.
diff --git a/includes/Checker/Check_Context.php b/includes/Checker/Check_Context.php
index ff0db96b1..7f7cb88d0 100644
--- a/includes/Checker/Check_Context.php
+++ b/includes/Checker/Check_Context.php
@@ -12,7 +12,7 @@
/**
* Class representing the context of a plugin to check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
final class Check_Context extends Plugin_Context {
diff --git a/includes/Checker/Check_Repository.php b/includes/Checker/Check_Repository.php
index 7c757d04b..aaf8c6976 100644
--- a/includes/Checker/Check_Repository.php
+++ b/includes/Checker/Check_Repository.php
@@ -10,14 +10,14 @@
/**
* Check Repository interface.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface Check_Repository {
/**
* Bitwise flag for static type checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
const TYPE_STATIC = 1;
@@ -25,7 +25,7 @@ interface Check_Repository {
/**
* Bitwise flag for runtime type checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
const TYPE_RUNTIME = 2;
@@ -35,7 +35,7 @@ interface Check_Repository {
*
* This is the same as `TYPE_STATIC | TYPE_RUNTIME`.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
const TYPE_ALL = 3;
@@ -43,7 +43,7 @@ interface Check_Repository {
/**
* Bitwise flag for experimental checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
const INCLUDE_EXPERIMENTAL = 4;
@@ -51,7 +51,7 @@ interface Check_Repository {
/**
* Registers a check to the repository.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $slug The checks slug.
* @param Check $check The Check instance.
@@ -61,7 +61,7 @@ public function register_check( $slug, Check $check );
/**
* Returns an array of checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param int $flags The check type flag.
* @return Check_Collection Check collection providing an indexed array of check instances.
diff --git a/includes/Checker/Check_Result.php b/includes/Checker/Check_Result.php
index 4750c09f2..88633f1aa 100644
--- a/includes/Checker/Check_Result.php
+++ b/includes/Checker/Check_Result.php
@@ -10,14 +10,14 @@
/**
* Result for running checks on a plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
final class Check_Result {
/**
* Context for the plugin to check.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Check_Context
*/
protected $check_context;
@@ -25,7 +25,7 @@ final class Check_Result {
/**
* List of errors.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $errors = array();
@@ -33,7 +33,7 @@ final class Check_Result {
/**
* List of warnings.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $warnings = array();
@@ -41,7 +41,7 @@ final class Check_Result {
/**
* Number of errors.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
protected $error_count = 0;
@@ -49,7 +49,7 @@ final class Check_Result {
/**
* Number of warnings.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
protected $warning_count = 0;
@@ -57,7 +57,7 @@ final class Check_Result {
/**
* Sets the context for the plugin to check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Context $check_context Check context instance for the plugin.
*/
@@ -68,7 +68,7 @@ public function __construct( Check_Context $check_context ) {
/**
* Returns the context for the plugin to check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Check_Context Plugin context instance.
*/
@@ -79,7 +79,7 @@ public function plugin() {
/**
* Adds an error or warning to the respective stack.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param bool $error Whether it is an error message.
* @param string $message The message.
@@ -145,7 +145,7 @@ public function add_message( $error, $message, $args = array() ) {
/**
* Returns all errors.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array All errors with their data.
*/
@@ -156,7 +156,7 @@ public function get_errors() {
/**
* Returns all warnings.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array All warnings with their data.
*/
@@ -167,7 +167,7 @@ public function get_warnings() {
/**
* Returns the number of errors.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return int Number of errors found.
*/
@@ -178,7 +178,7 @@ public function get_error_count() {
/**
* Returns the number of warnings.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return int Number of warnings found.
*/
diff --git a/includes/Checker/Check_Runner.php b/includes/Checker/Check_Runner.php
index 27390283e..1cccdcde3 100644
--- a/includes/Checker/Check_Runner.php
+++ b/includes/Checker/Check_Runner.php
@@ -12,14 +12,14 @@
/**
* Interface for runner classes like AJAX runner or CLI runner.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface Check_Runner {
/**
* Determines if the current request is intended for the plugin checker.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return boolean Returns true if the check is for plugin else false.
*/
@@ -28,7 +28,7 @@ public static function is_plugin_check();
/**
* Prepares the environment for running the requested checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert any changes made here.
*
@@ -39,7 +39,7 @@ public function prepare();
/**
* Runs the requested checks against the plugin context and returns the results.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Check_Result Object containing all check results.
*
diff --git a/includes/Checker/Checks.php b/includes/Checker/Checks.php
index 525eec6ec..2709e0013 100644
--- a/includes/Checker/Checks.php
+++ b/includes/Checker/Checks.php
@@ -12,14 +12,14 @@
/**
* Class to run checks on a plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
final class Checks {
/**
* Array of all available Checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $checks;
@@ -27,7 +27,7 @@ final class Checks {
/**
* Runs checks against the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Context $context The check context for the plugin to be checked.
* @param array $checks An array of Check objects to run.
@@ -52,7 +52,7 @@ function ( Check $check ) use ( $result ) {
/**
* Runs a given check with the given result object to amend.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check $check The check to run.
* @param Check_Result $result The result object to amend.
diff --git a/includes/Checker/Checks/Abstract_File_Check.php b/includes/Checker/Checks/Abstract_File_Check.php
index f4b046831..b216e2d2c 100644
--- a/includes/Checker/Checks/Abstract_File_Check.php
+++ b/includes/Checker/Checks/Abstract_File_Check.php
@@ -18,14 +18,14 @@
/**
* Base class for a check that inspects the plugin's files and contents.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
abstract class Abstract_File_Check implements Static_Check {
/**
* Internal cache for plugin-specific file lists.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private static $file_list_cache = array();
@@ -33,7 +33,7 @@ abstract class Abstract_File_Check implements Static_Check {
/**
* Internal cache for file contents.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private static $file_contents_cache = array();
@@ -41,7 +41,7 @@ abstract class Abstract_File_Check implements Static_Check {
/**
* Amends the given result by running the check on the associated plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
*
@@ -56,7 +56,7 @@ final public function run( Check_Result $result ) {
/**
* Amends the given result by running the check on the given list of files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -69,7 +69,7 @@ abstract protected function check_files( Check_Result $result, array $files );
/**
* Filters a given list of files to only contain those with specific extension.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $files List of absolute file paths.
* @param string $extension File extension to match.
@@ -82,7 +82,7 @@ final protected static function filter_files_by_extension( array $files, $extens
/**
* Filters a given list of files to only contain those with specific extensions.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $files List of absolute file paths.
* @param array $extensions List of file extensions to match.
@@ -105,7 +105,7 @@ static function ( $file ) use ( $lookup ) {
/**
* Filters a given list of files to only contain those where the file name matches the given regular expression.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $files List of absolute file paths.
* @param string $regex Regular expression for file paths to match.
@@ -121,7 +121,7 @@ final protected static function filter_files_by_regex( array $files, $regex ) {
* This is a wrapper around the native `preg_match()` function that will match the first occurrence within the
* list of files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $pattern The pattern to search for.
* @param array $files List of absolute file paths.
@@ -147,7 +147,7 @@ final protected static function file_preg_match( $pattern, array $files, array &
* This is a wrapper around the native `str_contains()` function that will find the needle within the list of
* files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $files List of absolute file paths.
* @param string $needle The substring to search for.
@@ -168,7 +168,7 @@ final protected static function file_str_contains( array $files, $needle ) {
*
* This is effectively a caching wrapper around the native `file_get_contents()` function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $file The file name.
* @return string The file contents.
@@ -187,7 +187,7 @@ private static function file_get_contents( $file ) {
/**
* Gets the list of all files that are part of the given plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Context $plugin Context for the plugin to check.
* @return array List of absolute file paths.
diff --git a/includes/Checker/Checks/Abstract_PHP_CodeSniffer_Check.php b/includes/Checker/Checks/Abstract_PHP_CodeSniffer_Check.php
index f4da97ab6..ca1165b26 100644
--- a/includes/Checker/Checks/Abstract_PHP_CodeSniffer_Check.php
+++ b/includes/Checker/Checks/Abstract_PHP_CodeSniffer_Check.php
@@ -17,7 +17,7 @@
/**
* Check for running one or more PHP CodeSniffer sniffs.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
abstract class Abstract_PHP_CodeSniffer_Check implements Static_Check {
@@ -26,7 +26,7 @@ abstract class Abstract_PHP_CodeSniffer_Check implements Static_Check {
/**
* List of allowed PHPCS arguments.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $allowed_args = array(
@@ -39,7 +39,7 @@ abstract class Abstract_PHP_CodeSniffer_Check implements Static_Check {
/**
* Returns an associative array of arguments to pass to PHPCS.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array {
* An associative array of PHPCS CLI arguments. Can include one or more of the following options.
@@ -55,7 +55,7 @@ abstract protected function get_args();
/**
* Amends the given result by running the check on the associated plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
*
@@ -131,7 +131,7 @@ final public function run( Check_Result $result ) {
/**
* Parse the command arguments.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $argv An array of arguments to pass.
* @param array $defaults An array of default arguments.
@@ -152,7 +152,7 @@ private function parse_argv( $argv, $defaults ) {
/**
* Gets the default command arguments.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @return array An indexed array of PHPCS CLI arguments.
@@ -185,7 +185,7 @@ private function get_argv_defaults( Check_Result $result ): array {
* Resets \PHP_CodeSniffer\Config::$overriddenDefaults to prevent
* incorrect results when running multiple checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
private function reset_php_codesniffer_config() {
if ( class_exists( '\PHP_CodeSniffer\Config' ) ) {
diff --git a/includes/Checker/Checks/Abstract_Runtime_Check.php b/includes/Checker/Checks/Abstract_Runtime_Check.php
index dde63de12..51f069391 100644
--- a/includes/Checker/Checks/Abstract_Runtime_Check.php
+++ b/includes/Checker/Checks/Abstract_Runtime_Check.php
@@ -15,14 +15,14 @@
/**
* Abstract Runtime Check class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
abstract class Abstract_Runtime_Check implements Runtime_Check, Preparation {
/**
* Runs preparation step for the environment and returns a closure as a cleanup function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert the changes made here.
*
@@ -33,7 +33,7 @@ abstract public function prepare();
/**
* Amends the given result by running the check on the associated plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
*
diff --git a/includes/Checker/Checks/Code_Obfuscation_Check.php b/includes/Checker/Checks/Code_Obfuscation_Check.php
index 9541018f6..cfa540d7e 100644
--- a/includes/Checker/Checks/Code_Obfuscation_Check.php
+++ b/includes/Checker/Checks/Code_Obfuscation_Check.php
@@ -16,7 +16,7 @@
/**
* Check to detect PHP code obfuscation.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Code_Obfuscation_Check extends Abstract_File_Check {
@@ -31,7 +31,7 @@ class Code_Obfuscation_Check extends Abstract_File_Check {
/**
* Bitwise flags to control check behavior.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
protected $flags = 0;
@@ -39,7 +39,7 @@ class Code_Obfuscation_Check extends Abstract_File_Check {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param int $flags Bitwise flags to control check behavior.
*/
@@ -52,7 +52,7 @@ public function __construct( $flags = self::TYPE_ALL ) {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -63,7 +63,7 @@ public function get_categories() {
/**
* Amends the given result by running the check on the given list of files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -88,7 +88,7 @@ protected function check_files( Check_Result $result, array $files ) {
/**
* Looks for Zend Guard obfuscated files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $php_files List of absolute PHP file paths.
@@ -112,7 +112,7 @@ protected function look_for_zendguard( Check_Result $result, array $php_files )
/**
* Looks for Source Guardian obfuscated files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $php_files List of absolute PHP file paths.
@@ -136,7 +136,7 @@ protected function look_for_sourceguardian( Check_Result $result, array $php_fil
/**
* Looks for ionCube obfuscated files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $php_files List of absolute PHP file paths.
diff --git a/includes/Checker/Checks/Direct_DB_Queries_Check.php b/includes/Checker/Checks/Direct_DB_Queries_Check.php
index 98639ab77..02f40a9fb 100644
--- a/includes/Checker/Checks/Direct_DB_Queries_Check.php
+++ b/includes/Checker/Checks/Direct_DB_Queries_Check.php
@@ -13,7 +13,7 @@
/**
* Check for running WordPress direct DB queries sniffs.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Direct_DB_Queries_Check extends Abstract_PHP_CodeSniffer_Check {
@@ -24,7 +24,7 @@ class Direct_DB_Queries_Check extends Abstract_PHP_CodeSniffer_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -35,7 +35,7 @@ public function get_categories() {
/**
* Returns an associative array of arguments to pass to PHPCS.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An associative array of PHPCS CLI arguments.
*/
diff --git a/includes/Checker/Checks/Enqueued_Scripts_In_Footer_Check.php b/includes/Checker/Checks/Enqueued_Scripts_In_Footer_Check.php
index 852d3b7aa..366114a6c 100644
--- a/includes/Checker/Checks/Enqueued_Scripts_In_Footer_Check.php
+++ b/includes/Checker/Checks/Enqueued_Scripts_In_Footer_Check.php
@@ -13,7 +13,7 @@
/**
* Check for running WordPress enqueued resource parameters sniffs.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Enqueued_Scripts_In_Footer_Check extends Abstract_PHP_CodeSniffer_Check {
@@ -24,7 +24,7 @@ class Enqueued_Scripts_In_Footer_Check extends Abstract_PHP_CodeSniffer_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -35,7 +35,7 @@ public function get_categories() {
/**
* Returns an associative array of arguments to pass to PHPCS.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An associative array of PHPCS CLI arguments.
*/
diff --git a/includes/Checker/Checks/Enqueued_Scripts_Size_Check.php b/includes/Checker/Checks/Enqueued_Scripts_Size_Check.php
index 55d6b139d..874d75b25 100644
--- a/includes/Checker/Checks/Enqueued_Scripts_Size_Check.php
+++ b/includes/Checker/Checks/Enqueued_Scripts_Size_Check.php
@@ -19,7 +19,7 @@
/**
* Check for enqueued script sizes.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Enqueued_Scripts_Size_Check extends Abstract_Runtime_Check implements With_Shared_Preparations {
@@ -30,7 +30,7 @@ class Enqueued_Scripts_Size_Check extends Abstract_Runtime_Check implements With
/**
* Threshold for script size to surface a warning for.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
private $threshold_size;
@@ -38,7 +38,7 @@ class Enqueued_Scripts_Size_Check extends Abstract_Runtime_Check implements With
/**
* List of viewable post types.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $viewable_post_types;
@@ -46,7 +46,7 @@ class Enqueued_Scripts_Size_Check extends Abstract_Runtime_Check implements With
/**
* Set the threshold size for script sizes to surface warnings.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param int $threshold_size The threshold in bytes for script size to surface warnings.
*/
@@ -59,7 +59,7 @@ public function __construct( $threshold_size = 300000 ) {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -70,7 +70,7 @@ public function get_categories() {
/**
* Runs this preparation step for the environment and returns a cleanup function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert any changes made here.
*
@@ -96,7 +96,7 @@ public function prepare() {
/**
* Returns an array of shared preparations for the check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array Returns a map of $class_name => $constructor_args pairs. If the class does not
* need any constructor arguments, it would just be an empty array.
@@ -122,7 +122,7 @@ static function ( $post_type ) {
/**
* Runs the check on the plugin and amends results.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check results to amend and the plugin context.
*/
@@ -138,7 +138,7 @@ function ( $url ) use ( $result ) {
/**
* Gets the list of URLs to run this check for.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array List of URL strings (either full URLs or paths).
*
@@ -175,7 +175,7 @@ protected function get_urls() {
/**
* Amends the given result by running the check for the given URL.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param string $url URL to run the check for.
@@ -251,7 +251,7 @@ protected function check_url( Check_Result $result, $url ) {
/**
* Returns an array of viewable post types.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array Array of viewable post type slugs.
*/
diff --git a/includes/Checker/Checks/Enqueued_Styles_Scope_Check.php b/includes/Checker/Checks/Enqueued_Styles_Scope_Check.php
index 3166fe3e0..06b58f387 100644
--- a/includes/Checker/Checks/Enqueued_Styles_Scope_Check.php
+++ b/includes/Checker/Checks/Enqueued_Styles_Scope_Check.php
@@ -19,7 +19,7 @@
/**
* Check if a stylesheet is present in all URLs.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Enqueued_Styles_Scope_Check extends Abstract_Runtime_Check implements With_Shared_Preparations {
@@ -30,7 +30,7 @@ class Enqueued_Styles_Scope_Check extends Abstract_Runtime_Check implements With
/**
* List of viewable post types.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $viewable_post_types;
@@ -38,7 +38,7 @@ class Enqueued_Styles_Scope_Check extends Abstract_Runtime_Check implements With
/**
* List of plugin styles.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $plugin_styles = array();
@@ -46,7 +46,7 @@ class Enqueued_Styles_Scope_Check extends Abstract_Runtime_Check implements With
/**
* Plugin style counter.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $plugin_style_count = array();
@@ -56,7 +56,7 @@ class Enqueued_Styles_Scope_Check extends Abstract_Runtime_Check implements With
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -67,7 +67,7 @@ public function get_categories() {
/**
* Runs this preparation step for the environment and returns a cleanup function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert any changes made here.
*
@@ -93,7 +93,7 @@ public function prepare() {
/**
* Returns an array of shared preparations for the check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array Returns a map of $class_name => $constructor_args pairs. If the class does not
* need any constructor arguments, it would just be an empty array.
@@ -119,7 +119,7 @@ static function ( $post_type ) {
/**
* Runs the check on the plugin and amends results.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check results to amend and the plugin context.
*/
@@ -150,7 +150,7 @@ function () use ( $result ) {
/**
* Gets the list of URLs to run this check for.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array List of URL strings (either full URLs or paths).
*
@@ -216,7 +216,7 @@ protected function get_urls() {
/**
* Amends the given result by running the check for the given URL.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
*
@@ -261,7 +261,7 @@ protected function check_url( Check_Result $result ) {
/**
* Returns an array of viewable post types.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array Array of viewable post type slugs.
*/
diff --git a/includes/Checker/Checks/File_Type_Check.php b/includes/Checker/Checks/File_Type_Check.php
index dc83f59b3..244799947 100644
--- a/includes/Checker/Checks/File_Type_Check.php
+++ b/includes/Checker/Checks/File_Type_Check.php
@@ -16,7 +16,7 @@
/**
* Check to detect disallowed file types.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class File_Type_Check extends Abstract_File_Check {
@@ -33,7 +33,7 @@ class File_Type_Check extends Abstract_File_Check {
/**
* Bitwise flags to control check behavior.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
protected $flags = 0;
@@ -41,7 +41,7 @@ class File_Type_Check extends Abstract_File_Check {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param int $flags Bitwise flags to control check behavior.
*/
@@ -54,7 +54,7 @@ public function __construct( $flags = self::TYPE_ALL ) {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -65,7 +65,7 @@ public function get_categories() {
/**
* Amends the given result by running the check on the given list of files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -94,7 +94,7 @@ protected function check_files( Check_Result $result, array $files ) {
/**
* Looks for compressed files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -116,7 +116,7 @@ protected function look_for_compressed_files( Check_Result $result, array $files
/**
* Looks for PHAR files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -138,7 +138,7 @@ protected function look_for_phar_files( Check_Result $result, array $files ) {
/**
* Looks for VCS directories and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -178,7 +178,7 @@ function ( $directory ) use ( $directories ) {
/**
* Looks for hidden files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -201,7 +201,7 @@ protected function look_for_hidden_files( Check_Result $result, array $files ) {
/**
* Looks for application files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
diff --git a/includes/Checker/Checks/I18n_Usage_Check.php b/includes/Checker/Checks/I18n_Usage_Check.php
index e26acd508..2c3a0db3d 100644
--- a/includes/Checker/Checks/I18n_Usage_Check.php
+++ b/includes/Checker/Checks/I18n_Usage_Check.php
@@ -13,7 +13,7 @@
/**
* Check for running WordPress internationalization sniffs.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class I18n_Usage_Check extends Abstract_PHP_CodeSniffer_Check {
@@ -24,7 +24,7 @@ class I18n_Usage_Check extends Abstract_PHP_CodeSniffer_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -35,7 +35,7 @@ public function get_categories() {
/**
* Returns an associative array of arguments to pass to PHPCS.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An associative array of PHPCS CLI arguments.
*/
diff --git a/includes/Checker/Checks/Late_Escaping_Check.php b/includes/Checker/Checks/Late_Escaping_Check.php
index 9a020e914..6b548d2d3 100644
--- a/includes/Checker/Checks/Late_Escaping_Check.php
+++ b/includes/Checker/Checks/Late_Escaping_Check.php
@@ -13,7 +13,7 @@
/**
* Check for running WordPress escape output sniffs.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Late_Escaping_Check extends Abstract_PHP_CodeSniffer_Check {
@@ -24,7 +24,7 @@ class Late_Escaping_Check extends Abstract_PHP_CodeSniffer_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -35,7 +35,7 @@ public function get_categories() {
/**
* Returns an associative array of arguments to pass to PHPCS.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An associative array of PHPCS CLI arguments.
*/
diff --git a/includes/Checker/Checks/Localhost_Check.php b/includes/Checker/Checks/Localhost_Check.php
index ed6b30e5b..daf80c179 100644
--- a/includes/Checker/Checks/Localhost_Check.php
+++ b/includes/Checker/Checks/Localhost_Check.php
@@ -15,7 +15,7 @@
/**
* Check for detecting localhost in plugin files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Localhost_Check extends Abstract_File_Check {
@@ -27,7 +27,7 @@ class Localhost_Check extends Abstract_File_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -38,7 +38,7 @@ public function get_categories() {
/**
* Check the localhost in files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param array $files Array of plugin files.
diff --git a/includes/Checker/Checks/No_Unfiltered_Uploads_Check.php b/includes/Checker/Checks/No_Unfiltered_Uploads_Check.php
index 0156f692e..ab5e0e102 100644
--- a/includes/Checker/Checks/No_Unfiltered_Uploads_Check.php
+++ b/includes/Checker/Checks/No_Unfiltered_Uploads_Check.php
@@ -15,7 +15,7 @@
/**
* Check for detecting "ALLOW_UNFILTERED_UPLOADS" constant in plugin files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class No_Unfiltered_Uploads_Check extends Abstract_File_Check {
@@ -27,7 +27,7 @@ class No_Unfiltered_Uploads_Check extends Abstract_File_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -38,7 +38,7 @@ public function get_categories() {
/**
* Check the "ALLOW_UNFILTERED_UPLOADS" constant in file.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param array $files Array of plugin files.
diff --git a/includes/Checker/Checks/Performant_WP_Query_Params_Check.php b/includes/Checker/Checks/Performant_WP_Query_Params_Check.php
index 6ada74eb7..b2f10b29b 100644
--- a/includes/Checker/Checks/Performant_WP_Query_Params_Check.php
+++ b/includes/Checker/Checks/Performant_WP_Query_Params_Check.php
@@ -13,7 +13,7 @@
/**
* Check for running WordPress performant WP_Query params sniffs.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Performant_WP_Query_Params_Check extends Abstract_PHP_CodeSniffer_Check {
@@ -24,7 +24,7 @@ class Performant_WP_Query_Params_Check extends Abstract_PHP_CodeSniffer_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -35,7 +35,7 @@ public function get_categories() {
/**
* Returns an associative array of arguments to pass to PHPCS.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An associative array of PHPCS CLI arguments.
*/
diff --git a/includes/Checker/Checks/Plugin_Header_Text_Domain_Check.php b/includes/Checker/Checks/Plugin_Header_Text_Domain_Check.php
index 11ea637f5..faa66d259 100644
--- a/includes/Checker/Checks/Plugin_Header_Text_Domain_Check.php
+++ b/includes/Checker/Checks/Plugin_Header_Text_Domain_Check.php
@@ -17,7 +17,7 @@
/**
* Check for plugin header text domain.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Plugin_Header_Text_Domain_Check implements Static_Check {
@@ -29,7 +29,7 @@ class Plugin_Header_Text_Domain_Check implements Static_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -40,7 +40,7 @@ public function get_categories() {
/**
* Amends the given result by running the check on the associated plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
*
diff --git a/includes/Checker/Checks/Plugin_Readme_Check.php b/includes/Checker/Checks/Plugin_Readme_Check.php
index 581d2abe2..204325206 100644
--- a/includes/Checker/Checks/Plugin_Readme_Check.php
+++ b/includes/Checker/Checks/Plugin_Readme_Check.php
@@ -17,7 +17,7 @@
/**
* Check the plugins readme file and contents.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Plugin_Readme_Check extends Abstract_File_Check {
@@ -30,7 +30,7 @@ class Plugin_Readme_Check extends Abstract_File_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -41,7 +41,7 @@ public function get_categories() {
/**
* Check the readme file.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param array $files Array of plugin files.
@@ -93,7 +93,7 @@ protected function check_files( Check_Result $result, array $files ) {
/**
* Checks the readme file for plugin name.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
@@ -122,7 +122,7 @@ private function check_name( Check_Result $result, string $readme_file, Parser $
/**
* Checks the readme file for default text.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
@@ -150,7 +150,7 @@ private function check_default_text( Check_Result $result, string $readme_file,
/**
* Checks the readme file for a valid license.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
@@ -184,7 +184,7 @@ private function check_license( Check_Result $result, string $readme_file, Parse
/**
* Checks the readme file stable tag.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
@@ -236,7 +236,7 @@ private function check_stable_tag( Check_Result $result, string $readme_file, Pa
/**
* Checks the readme file warnings.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param string $readme_file Readme file.
@@ -309,7 +309,7 @@ private function check_for_warnings( Check_Result $result, string $readme_file,
/**
* Filter the list of ignored readme parser warnings.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $ignored_warnings Array of ignored warning keys.
* @param Parser $parser The Parser object.
@@ -328,7 +328,7 @@ private function check_for_warnings( Check_Result $result, string $readme_file,
/**
* Returns current major WordPress version.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string Stable WordPress version.
*/
diff --git a/includes/Checker/Checks/Plugin_Review_PHPCS_Check.php b/includes/Checker/Checks/Plugin_Review_PHPCS_Check.php
index 483124471..609d8952a 100644
--- a/includes/Checker/Checks/Plugin_Review_PHPCS_Check.php
+++ b/includes/Checker/Checks/Plugin_Review_PHPCS_Check.php
@@ -13,7 +13,7 @@
/**
* Check for running WordPress plugin review PHPCS standard.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Plugin_Review_PHPCS_Check extends Abstract_PHP_CodeSniffer_Check {
@@ -24,7 +24,7 @@ class Plugin_Review_PHPCS_Check extends Abstract_PHP_CodeSniffer_Check {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -35,7 +35,7 @@ public function get_categories() {
/**
* Returns an associative array of arguments to pass to PHPCS.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array An associative array of PHPCS CLI arguments.
*/
diff --git a/includes/Checker/Checks/Plugin_Updater_Check.php b/includes/Checker/Checks/Plugin_Updater_Check.php
index fe6a84b2d..ef17fb2bf 100644
--- a/includes/Checker/Checks/Plugin_Updater_Check.php
+++ b/includes/Checker/Checks/Plugin_Updater_Check.php
@@ -16,7 +16,7 @@
/**
* Check to detect plugin updater.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Plugin_Updater_Check extends Abstract_File_Check {
@@ -32,7 +32,7 @@ class Plugin_Updater_Check extends Abstract_File_Check {
/**
* Bitwise flags to control check behavior.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
protected $flags = 0;
@@ -40,7 +40,7 @@ class Plugin_Updater_Check extends Abstract_File_Check {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param int $flags Bitwise flags to control check behavior.
*/
@@ -53,7 +53,7 @@ public function __construct( $flags = self::TYPE_ALL ) {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -64,7 +64,7 @@ public function get_categories() {
/**
* Amends the given result by running the check on the given list of files.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $files List of absolute file paths.
@@ -99,7 +99,7 @@ protected function check_files( Check_Result $result, array $files ) {
/**
* Looks for UpdateURI in plugin header and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
*/
@@ -123,7 +123,7 @@ protected function look_for_update_uri_header( Check_Result $result ) {
/**
* Looks for plugin updater file and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $php_files List of absolute PHP file paths.
@@ -151,7 +151,7 @@ protected function look_for_updater_file( Check_Result $result, array $php_files
/**
* Looks for plugin updater code in plugin files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $php_files List of absolute PHP file paths.
@@ -188,7 +188,7 @@ protected function look_for_plugin_updaters( Check_Result $result, array $php_fi
/**
* Looks for plugin updater routines in plugin files and amends the given result with an error if found.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param array $php_files List of absolute PHP file paths.
diff --git a/includes/Checker/Checks/Trademarks_Check.php b/includes/Checker/Checks/Trademarks_Check.php
index 1603fe78c..4dfec155c 100644
--- a/includes/Checker/Checks/Trademarks_Check.php
+++ b/includes/Checker/Checks/Trademarks_Check.php
@@ -18,7 +18,7 @@
/**
* Check for trademarks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Trademarks_Check extends Abstract_File_Check {
@@ -29,7 +29,7 @@ class Trademarks_Check extends Abstract_File_Check {
/**
* Lists of trademark terms that are commonly abused on WordPress.org.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @var string[]
*/
@@ -148,7 +148,7 @@ class Trademarks_Check extends Abstract_File_Check {
/**
* Lists of trademarks that are allowed as 'for-whatever' ONLY.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @var string[]
*/
@@ -159,7 +159,7 @@ class Trademarks_Check extends Abstract_File_Check {
/**
* Lists of commonly used 'combo' names (to prevent things like 'woopress').
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @var string[]
*/
@@ -175,7 +175,7 @@ class Trademarks_Check extends Abstract_File_Check {
/**
* Bitwise flags to control check behavior.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var int
*/
protected $flags = 0;
@@ -183,7 +183,7 @@ class Trademarks_Check extends Abstract_File_Check {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param int $flags Bitwise flags to control check behavior.
*/
@@ -196,7 +196,7 @@ public function __construct( $flags = self::TYPE_ALL ) {
*
* Every check must have at least one category.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The categories for the check.
*/
@@ -207,7 +207,7 @@ public function get_categories() {
/**
* Check for trademarks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param array $files Array of plugin files.
@@ -233,7 +233,7 @@ protected function check_files( Check_Result $result, array $files ) {
/**
* Checks the trademarks in readme file plugin name.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
* @param array $files Array of plugin files.
@@ -268,7 +268,7 @@ private function check_for_name_in_readme( Check_Result $result, array $files )
/**
* Checks the readme file for default text.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
*/
@@ -297,7 +297,7 @@ private function check_for_name_in_main_file( Check_Result $result ) {
/**
* Checks the readme file for default text.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The Check Result to amend.
*/
@@ -324,7 +324,7 @@ private function check_for_slug( Check_Result $result ) {
/**
* Determines if we find a trademarked term in plugin name.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $plugin_name The plugin name.
*
@@ -371,7 +371,7 @@ private function validate_name_has_no_trademarks( $plugin_name ) {
/**
* Determines if we find a trademarked term in plugin slug.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $plugin_slug The plugin slug.
*
@@ -418,7 +418,7 @@ private function validate_slug_has_no_trademarks( $plugin_slug ) {
/**
* Whether the plugin uses a trademark in the slug.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $slug The plugin slug.
* @return string|false The trademark slug if found, false otherwise.
@@ -468,7 +468,7 @@ private function has_trademarked_slug( $slug ) {
/**
* Validates whether the trademark is valid with a for-use exception.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $slug The plugin slug.
* @param string $trademark The trademark term.
diff --git a/includes/Checker/Default_Check_Collection.php b/includes/Checker/Default_Check_Collection.php
index 4451860fa..14f72c894 100644
--- a/includes/Checker/Default_Check_Collection.php
+++ b/includes/Checker/Default_Check_Collection.php
@@ -14,14 +14,14 @@
/**
* Default Check Collection class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Default_Check_Collection implements Check_Collection {
/**
* Map of `$check_slug => $check_obj` pairs.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $checks;
@@ -29,7 +29,7 @@ class Default_Check_Collection implements Check_Collection {
/**
* List of check slugs, in the same order as `$checks` - effectively the keys of that array.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $slugs;
@@ -37,7 +37,7 @@ class Default_Check_Collection implements Check_Collection {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $checks Map of `$check_slug => $check_obj` pairs for the collection.
*/
@@ -49,7 +49,7 @@ public function __construct( array $checks ) {
/**
* Returns the raw indexed array representation of this collection.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array The indexed array of check objects.
*/
@@ -60,7 +60,7 @@ public function to_array(): array {
/**
* Returns the raw map of check slugs and their check objects as a representation of this collection.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array Map of `$check_slug => $check_obj` pairs.
*/
@@ -71,7 +71,7 @@ public function to_map(): array {
/**
* Returns a new check collection containing the subset of checks based on the given check filter function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @phpstan-param callable(Check,string): bool $filter_fn
*
@@ -94,7 +94,7 @@ public function filter( callable $filter_fn ): Check_Collection {
*
* If the given list is empty, the same collection will be returned without any change.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs List of slugs to limit to only those. If empty, the same collection is returned.
* @return Check_Collection New check collection, effectively a subset of this one.
@@ -124,7 +124,7 @@ public function include( array $check_slugs ): Check_Collection {
*
* If the given list is empty, the same collection will be returned without any change.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs List of slugs to exclude. If empty, the same collection is returned.
* @return Check_Collection New check collection, effectively a subset of this one.
@@ -145,7 +145,7 @@ static function ( Check $check, $slug ) use( $check_slugs ) {
/**
* Throws an exception if any of the given check slugs are not present, or returns the same collection otherwise.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $check_slugs List of slugs to limit to only those. If empty, the same collection is returned.
* @return Check_Collection The unchanged check collection.
@@ -171,7 +171,7 @@ public function require( array $check_slugs ): Check_Collection {
/**
* Counts the checks in the collection.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return int Number of checks in the collection.
*/
@@ -182,7 +182,7 @@ public function count(): int {
/**
* Returns an iterator for the checks in the collection.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Traversable Checks iterator.
*/
@@ -193,7 +193,7 @@ public function getIterator(): Traversable {
/**
* Checks whether a check exists with the given slug or index.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string|int $offset Either a check slug (string) or index (integer).
* @return bool True if a check exists at the given slug or index, false otherwise.
@@ -210,7 +210,7 @@ public function offsetExists( $offset ) {
/**
* Retrieves the check with the given slug or index.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string|int $offset Either a check slug (string) or index (integer).
* @return Check|null Check with the given slug or index, or null if it does not exist.
@@ -236,7 +236,7 @@ public function offsetGet( $offset ) {
*
* This method does nothing as the collection is read-only.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string|int $offset Either a check slug (string) or index (integer).
* @param mixed $value Value to set.
@@ -251,7 +251,7 @@ public function offsetSet( $offset, $value ) {
*
* This method does nothing as the collection is read-only.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string|int $offset Either a check slug (string) or index (integer).
*/
diff --git a/includes/Checker/Default_Check_Repository.php b/includes/Checker/Default_Check_Repository.php
index 9b91bc83a..8e0872e65 100644
--- a/includes/Checker/Default_Check_Repository.php
+++ b/includes/Checker/Default_Check_Repository.php
@@ -10,14 +10,14 @@
/**
* Default Check Repository class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Default_Check_Repository extends Empty_Check_Repository {
/**
* Initializes checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function __construct() {
$this->register_default_checks();
@@ -26,13 +26,13 @@ public function __construct() {
/**
* Registers Checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
private function register_default_checks() {
/**
* Filters the available plugin check classes.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $checks An array map of check slugs to Check instances.
*/
diff --git a/includes/Checker/Empty_Check_Repository.php b/includes/Checker/Empty_Check_Repository.php
index 558a5dc28..d4c26fafa 100644
--- a/includes/Checker/Empty_Check_Repository.php
+++ b/includes/Checker/Empty_Check_Repository.php
@@ -12,14 +12,14 @@
/**
* Empty Check Repository class.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Empty_Check_Repository implements Check_Repository {
/**
* Array map holding all runtime checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $runtime_checks = array();
@@ -27,7 +27,7 @@ class Empty_Check_Repository implements Check_Repository {
/**
* Array map holding all static checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $static_checks = array();
@@ -35,7 +35,7 @@ class Empty_Check_Repository implements Check_Repository {
/**
* Registers a check to the repository.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $slug The checks slug.
* @param Check $check The Check instance.
@@ -80,7 +80,7 @@ public function register_check( $slug, Check $check ) {
/**
* Returns an array of checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param int $flags The check type flag.
* @return Check_Collection Check collection providing an indexed array of check instances.
diff --git a/includes/Checker/Preparation.php b/includes/Checker/Preparation.php
index ad48db62e..8b290bff3 100644
--- a/includes/Checker/Preparation.php
+++ b/includes/Checker/Preparation.php
@@ -12,14 +12,14 @@
/**
* Interface for a single preparation step.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface Preparation {
/**
* Runs preparation step for the environment and returns a closure as a cleanup function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert the changes made here.
*
diff --git a/includes/Checker/Preparations/Demo_Posts_Creation_Preparation.php b/includes/Checker/Preparations/Demo_Posts_Creation_Preparation.php
index 7ac603dac..6253f3a10 100644
--- a/includes/Checker/Preparations/Demo_Posts_Creation_Preparation.php
+++ b/includes/Checker/Preparations/Demo_Posts_Creation_Preparation.php
@@ -13,14 +13,14 @@
/**
* Class to create demo posts to be used by Checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Demo_Posts_Creation_Preparation implements Preparation {
/**
* An array of posts data to create.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
protected $posts;
@@ -28,7 +28,7 @@ class Demo_Posts_Creation_Preparation implements Preparation {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $posts An array of posts to create in the database.
*/
@@ -39,7 +39,7 @@ public function __construct( array $posts ) {
/**
* Creates the demo posts in the database to be us
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert changes made by theme and plugin preparation classes.
*
diff --git a/includes/Checker/Preparations/Force_Single_Plugin_Preparation.php b/includes/Checker/Preparations/Force_Single_Plugin_Preparation.php
index 8408ac501..c6d00505b 100644
--- a/includes/Checker/Preparations/Force_Single_Plugin_Preparation.php
+++ b/includes/Checker/Preparations/Force_Single_Plugin_Preparation.php
@@ -15,14 +15,14 @@
*
* This ensures the plugin is checked as much in isolation as possible.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Force_Single_Plugin_Preparation implements Preparation {
/**
* Plugin slug.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $plugin_basename;
@@ -30,7 +30,7 @@ class Force_Single_Plugin_Preparation implements Preparation {
/**
* Sets the plugin slug.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $plugin_basename Slug of the plugin, E.g. "akismet\akismet.php".
*/
@@ -41,7 +41,7 @@ public function __construct( $plugin_basename ) {
/**
* Runs this preparation step for the environment and returns a cleanup function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert any changes made here.
*
@@ -76,7 +76,7 @@ public function prepare() {
/**
* Filter active plugins.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $active_plugins List of active plugins.
* @return array List of active plugins.
diff --git a/includes/Checker/Preparations/Universal_Runtime_Preparation.php b/includes/Checker/Preparations/Universal_Runtime_Preparation.php
index 8b5d49a70..29bdc610b 100644
--- a/includes/Checker/Preparations/Universal_Runtime_Preparation.php
+++ b/includes/Checker/Preparations/Universal_Runtime_Preparation.php
@@ -14,14 +14,14 @@
/**
* Class handle all preparations required for when at least one `Runtime_Check` is being run.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Universal_Runtime_Preparation implements Preparation {
/**
* Context for the plugin to check.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Check_Context
*/
protected $check_context;
@@ -29,7 +29,7 @@ class Universal_Runtime_Preparation implements Preparation {
/**
* Sets the context for the plugin to check.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Context $check_context Check context instance for the plugin.
*/
@@ -44,7 +44,7 @@ public function __construct( Check_Context $check_context ) {
* This preparation needs to be called very early in the WordPress lifecycle, before
* plugins are loaded, e.g. from a drop-in like `object-cache.php`.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return callable Cleanup function to revert changes made by theme and plugin preparation classes.
*
diff --git a/includes/Checker/Preparations/Use_Minimal_Theme_Preparation.php b/includes/Checker/Preparations/Use_Minimal_Theme_Preparation.php
index 03239bc57..2a89bc1ad 100644
--- a/includes/Checker/Preparations/Use_Minimal_Theme_Preparation.php
+++ b/includes/Checker/Preparations/Use_Minimal_Theme_Preparation.php
@@ -15,14 +15,14 @@
*
* This ensures the plugin is checked as much in isolation as possible.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Use_Minimal_Theme_Preparation implements Preparation {
/**
* Theme slug / directory name.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $theme_slug;
@@ -30,7 +30,7 @@ class Use_Minimal_Theme_Preparation implements Preparation {
/**
* Absolute path to themes root directory.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $themes_dir;
@@ -38,7 +38,7 @@ class Use_Minimal_Theme_Preparation implements Preparation {
/**
* Sets the theme slug and themes root directory.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $theme_slug Slug of the theme to enforce.
* @param string $themes_dir Optional. Absolute path to themes root directory, if not the regular wp-content/themes.
@@ -51,7 +51,7 @@ public function __construct( $theme_slug, $themes_dir = '' ) {
/**
* Runs this preparation step for the environment and returns a cleanup function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @global array $wp_theme_directories
*
@@ -110,7 +110,7 @@ public function prepare() {
*
* Used as a filter callback.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The theme slug.
*/
@@ -123,7 +123,7 @@ public function get_theme_slug() {
*
* Used as a filter callback.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The theme name.
*
@@ -144,7 +144,7 @@ public function get_theme_name() {
*
* Used as a filter callback.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The theme root.
*/
diff --git a/includes/Checker/Runtime_Check.php b/includes/Checker/Runtime_Check.php
index c227753d8..341cce170 100644
--- a/includes/Checker/Runtime_Check.php
+++ b/includes/Checker/Runtime_Check.php
@@ -10,7 +10,7 @@
/**
* Interface for runtime checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface Runtime_Check extends Check {
diff --git a/includes/Checker/Runtime_Environment_Setup.php b/includes/Checker/Runtime_Environment_Setup.php
index c6cad551c..26082a05a 100644
--- a/includes/Checker/Runtime_Environment_Setup.php
+++ b/includes/Checker/Runtime_Environment_Setup.php
@@ -10,14 +10,14 @@
/**
* Class to setup the Runtime Environment for Runtime checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
final class Runtime_Environment_Setup {
/**
* Sets up the WordPress environment for runtime checks
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function set_up() {
global $wpdb, $table_prefix, $wp_filesystem;
@@ -79,7 +79,7 @@ static function () use ( $permalink_structure ) {
/**
* Cleans up the runtime environment setup.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function clean_up() {
global $wpdb, $table_prefix, $wp_filesystem;
@@ -120,7 +120,7 @@ public function clean_up() {
/**
* Checks if the WordPress Environment can be set up for runtime checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool Returns true if the runtime environment can be set up, false if not.
*/
diff --git a/includes/Checker/Static_Check.php b/includes/Checker/Static_Check.php
index 68124a157..bcc19354f 100644
--- a/includes/Checker/Static_Check.php
+++ b/includes/Checker/Static_Check.php
@@ -10,7 +10,7 @@
/**
* Interface for static checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface Static_Check extends Check {
diff --git a/includes/Checker/With_Shared_Preparations.php b/includes/Checker/With_Shared_Preparations.php
index f84a79919..56e5c3aae 100644
--- a/includes/Checker/With_Shared_Preparations.php
+++ b/includes/Checker/With_Shared_Preparations.php
@@ -10,14 +10,14 @@
/**
* Interface for a check that relies on shared preparations.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
interface With_Shared_Preparations {
/**
* Gets the list of shared preparations.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return array Returns a map of $class_name => $constructor_args pairs. If the class does not
* need any constructor arguments, it would just be an empty array.
diff --git a/includes/Plugin_Context.php b/includes/Plugin_Context.php
index cb6ecee76..7a0527faf 100644
--- a/includes/Plugin_Context.php
+++ b/includes/Plugin_Context.php
@@ -12,7 +12,7 @@
/**
* Class representing the context in which the plugin is running.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Plugin_Context {
@@ -21,7 +21,7 @@ class Plugin_Context {
/**
* Absolute path of the plugin main file.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $main_file;
@@ -29,7 +29,7 @@ class Plugin_Context {
/**
* The minimum supported WordPress version of the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var string
*/
protected $minimum_supported_wp;
@@ -37,7 +37,7 @@ class Plugin_Context {
/**
* Constructor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $main_file The absolute path to the plugin main file.
*/
@@ -48,7 +48,7 @@ public function __construct( $main_file ) {
/**
* Returns the plugin basename.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string Plugin basename.
*/
@@ -59,7 +59,7 @@ public function basename() {
/**
* Returns the absolute path for a relative path to the plugin directory.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $relative_path Optional. Relative path. Default '/'.
* @return string Absolute path.
@@ -71,7 +71,7 @@ public function path( $relative_path = '/' ) {
/**
* Returns the full URL for a path relative to the plugin directory.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $relative_path Optional. Relative path. Default '/'.
* @return string Full URL.
@@ -83,7 +83,7 @@ public function url( $relative_path = '/' ) {
/**
* Returns the plugin location.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The plugin file if single file plugin. Or the plugin folder.
*/
@@ -103,7 +103,7 @@ public function location() {
*
* This is the case when the single file is directly placed within `wp-content/plugins`.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return bool true if the single file plugin, otherwise false.
*/
@@ -114,7 +114,7 @@ public function is_single_file_plugin() {
/**
* Determine the minimum supported WordPress version of the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string The minimum version supported, or empty string if unknown.
*/
diff --git a/includes/Plugin_Main.php b/includes/Plugin_Main.php
index a08ee9d2a..9c037dcaa 100644
--- a/includes/Plugin_Main.php
+++ b/includes/Plugin_Main.php
@@ -13,14 +13,14 @@
/**
* Main class for the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Plugin_Main {
/**
* Context instance for the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Plugin_Context
*/
protected $context;
@@ -28,7 +28,7 @@ class Plugin_Main {
/**
* Constructor. Set the plugin main file.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $main_file Absolute path of the plugin main file.
*/
@@ -39,7 +39,7 @@ public function __construct( $main_file ) {
/**
* Returns the Plugin Context.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Plugin_Context
*/
@@ -50,7 +50,7 @@ public function context() {
/**
* Registers WordPress hooks for the plugin.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public function add_hooks() {
if ( defined( 'WP_CLI' ) && WP_CLI ) {
diff --git a/includes/Traits/Amend_Check_Result.php b/includes/Traits/Amend_Check_Result.php
index b13bb3c4a..8da3ae64e 100644
--- a/includes/Traits/Amend_Check_Result.php
+++ b/includes/Traits/Amend_Check_Result.php
@@ -12,7 +12,7 @@
/**
* Trait for amending check results.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
trait Amend_Check_Result {
@@ -21,7 +21,7 @@ trait Amend_Check_Result {
/**
* Amends the given result with a message for the specified file, including error information.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param bool $error Whether it is an error or notice.
@@ -48,7 +48,7 @@ protected function add_result_message_for_file( Check_Result $result, $error, $m
/**
* Amends the given result with an error message for the specified file.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param string $message Error message.
@@ -64,7 +64,7 @@ protected function add_result_error_for_file( Check_Result $result, $message, $c
/**
* Amends the given result with a warning message for the specified file.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param string $message Error message.
diff --git a/includes/Traits/Experimental_Check.php b/includes/Traits/Experimental_Check.php
index 246c312a7..ff10ebd01 100644
--- a/includes/Traits/Experimental_Check.php
+++ b/includes/Traits/Experimental_Check.php
@@ -10,13 +10,13 @@
/**
* Trait for experimental checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
trait Experimental_Check {
/**
* Returns the checks stability.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string One of the check stability constant values.
*/
diff --git a/includes/Traits/File_Editor_URL.php b/includes/Traits/File_Editor_URL.php
index ee3e318af..d5e8ce608 100644
--- a/includes/Traits/File_Editor_URL.php
+++ b/includes/Traits/File_Editor_URL.php
@@ -12,14 +12,14 @@
/**
* Trait for file editor URL.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
trait File_Editor_URL {
/**
* Gets the URL for opening the plugin file in an external editor.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param Check_Result $result The check result to amend, including the plugin context to check.
* @param string $filename Error file name.
@@ -56,7 +56,7 @@ protected function get_file_editor_url( Check_Result $result, $filename, $line =
*
* For a template to be considered, the string '{{file}}' must be present in the filtered value.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string|null $editor_url_template Editor URL template. default null.
*/
@@ -75,7 +75,7 @@ protected function get_file_editor_url( Check_Result $result, $filename, $line =
*
* This is useful to map the file path from inside of a Docker container or VM to the host machine.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string|null $editor_url_template Editor URL template.
* @param array $source Source information.
diff --git a/includes/Traits/Find_Readme.php b/includes/Traits/Find_Readme.php
index e60a3dbee..d4966c2eb 100644
--- a/includes/Traits/Find_Readme.php
+++ b/includes/Traits/Find_Readme.php
@@ -10,14 +10,14 @@
/**
* Trait for find readme.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
trait Find_Readme {
/**
* Filter the given array of files for readme files (readme.txt or readme.md).
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $files Array of file files to be filtered.
* @param string $plugin_relative_path Plugin relative path.
diff --git a/includes/Traits/Stable_Check.php b/includes/Traits/Stable_Check.php
index 8a34e15c9..00109b0e0 100644
--- a/includes/Traits/Stable_Check.php
+++ b/includes/Traits/Stable_Check.php
@@ -10,13 +10,13 @@
/**
* Trait for stable checks.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
trait Stable_Check {
/**
* Returns the checks stability.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return string One of the check stability constant values.
*/
diff --git a/includes/Traits/URL_Aware.php b/includes/Traits/URL_Aware.php
index 487dd76e9..af8181a46 100644
--- a/includes/Traits/URL_Aware.php
+++ b/includes/Traits/URL_Aware.php
@@ -10,14 +10,14 @@
/**
* URL Aware trait.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
trait URL_Aware {
/**
* List of relevant global query variables to modify.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $query_globals = array(
@@ -39,7 +39,7 @@ trait URL_Aware {
/**
* List of relevant WP global variables to modify.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $wp_globals = array(
@@ -51,7 +51,7 @@ trait URL_Aware {
/**
* Array of original values for the global state.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var array
*/
private $global_values = array(
@@ -64,7 +64,7 @@ trait URL_Aware {
/**
* Backups the original values for any global state that may be modified to be restored later.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
protected function backup_globals() {
$this->global_values = array(
@@ -88,7 +88,7 @@ protected function backup_globals() {
/**
* Restores the original values for any global state that may have been modified.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
protected function restore_globals() {
$_GET = $this->global_values['get'];
@@ -110,7 +110,7 @@ protected function restore_globals() {
/**
* Sets the global state to as if a given URL has been requested.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $url URL to simulate request for.
*
@@ -190,7 +190,7 @@ protected function go_to( $url ) {
/**
* Simulate all the urls like WP and run the cleanup function.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $urls An array of URLs to run.
* @param callable $callback Callback function to run for each URL.
diff --git a/includes/Utilities/Plugin_Request_Utility.php b/includes/Utilities/Plugin_Request_Utility.php
index 12fb84149..96cd8c329 100644
--- a/includes/Utilities/Plugin_Request_Utility.php
+++ b/includes/Utilities/Plugin_Request_Utility.php
@@ -15,14 +15,14 @@
/**
* Class providing utility methods to return plugin information based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
class Plugin_Request_Utility {
/**
* Instance of the current runner based on the request.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var Abstract_Check_Runner|null
*/
protected static $runner;
@@ -30,7 +30,7 @@ class Plugin_Request_Utility {
/**
* The universal runtime preparation cleanups if applied.
*
- * @since n.e.x.t
+ * @since 1.0.0
* @var callable|null
*/
protected static $cleanup;
@@ -38,7 +38,7 @@ class Plugin_Request_Utility {
/**
* Returns the plugin basename based on the input provided.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param string $plugin_slug The plugin slug or basename.
* @return string The plugin basename.
@@ -85,7 +85,7 @@ public static function get_plugin_basename_from_input( $plugin_slug ) {
/**
* Initializes the runner classes.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public static function initialize_runner() {
$runners = array(
@@ -111,7 +111,7 @@ function () use ( $runner ) {
/**
* Get the Runner class for the current request.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @return Abstract_Check_Runner|null The Runner class for the request or null.
*/
@@ -126,7 +126,7 @@ public static function get_runner() {
/**
* Runs the cleanup functions and destroys the runner.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public static function destroy_runner() {
// Run the cleanup functions.
@@ -140,7 +140,7 @@ public static function destroy_runner() {
/**
* Gets the directories to ignore using the filter.
*
- * @since n.e.x.t
+ * @since 1.0.0
*/
public static function get_directories_to_ignore() {
// By default, ignore the '.git', 'vendor' and 'node_modules' directories.
@@ -153,7 +153,7 @@ public static function get_directories_to_ignore() {
/**
* Filters the directories to ignore.
*
- * @since n.e.x.t
+ * @since 1.0.0
*
* @param array $default_ignore_directories An array of directories to ignore.
*/
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index a370263f8..4de1d6db7 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -15,6 +15,7 @@
'; @@ -68,7 +68,7 @@ function wp_plugin_check_display_php_version_notice() { /** * Displays admin notice about missing Composer autoload files. * - * @since n.e.x.t + * @since 1.0.0 */ function wp_plugin_check_display_composer_autoload_notice() { echo '
'; diff --git a/readme.txt b/readme.txt index b6160dc8e..078de5a93 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Contributors: wordpressdotorg Requires at least: 6.3 Tested up to: 6.4 Requires PHP: 7.0 -Stable tag: n.e.x.t +Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: plugin best practices, testing, accessibility, performance, security @@ -69,19 +69,19 @@ In any case, passing the checks in this tool likely helps to achieve a smooth pl == Changelog == -= [1.0.0] 2024-01-29 = += 1.0.0 = * Feature - Complete overhaul of the plugin, its architecture, and all checks. * Feature - Added new [WP-CLI commands](https://github.com/WordPress/plugin-check/blob/trunk/docs/CLI.md) for running checks and listing available options. * Enhancement - Added option to only run checks for a specific category. -= [0.2.3] 2023-12-21 = += 0.2.3 = * Tweak - Use version [3.8.0 of the PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/tag/3.8.0) library, moving away from `squizlabs/PHP_CodeSniffer` to use `PHPCSStandards/PHP_CodeSniffer`. * Fix - Ensure the plugin works as expected on the WP playground environment to enable reviewers to use PCP. Props @tellyworth. * Fix - Undefined array key "argv" when running the plugin check in certain environments. Props @afragen. [#340](https://github.com/WordPress/plugin-check/pull/340) -= [0.2.2] 2023-12-13 = += 0.2.2 = * Enhancement - Include support for Windows Servers. * Enhancement - Avoid using PHP CLI directly, which enables plugin developers to use PCP in a variety of new environments. @@ -89,7 +89,7 @@ In any case, passing the checks in this tool likely helps to achieve a smooth pl * Fix - Prevent problems with Readme parser warning related to `contributor_ignored` for when running the check outside WP.org. Props @dev4press. [#276](https://github.com/10up/plugin-check/pull/276) * Fix - Remove extra period on the end of the sentence for Phar warning. Props @pixolin. [#275](https://github.com/10up/plugin-check/pull/275) -= [0.2.1] 2023-09-22 = += 0.2.1 = * Added - 'View in code editor' link beneath each PHPCS error or warning. Props @EvanHerman, @westonruter, @felixarntz, @mukeshpanchal27 [#262](https://github.com/10up/plugin-check/pull/262) * Fix - Ensure `readme.txt` has priority over `readme.md` when both are present. Props @bordoni, @afragen [#258](https://github.com/10up/plugin-check/pull/258) @@ -99,7 +99,7 @@ In any case, passing the checks in this tool likely helps to achieve a smooth pl * Fix - Ensure that we have PHP 7.2 compatibility remove trailing comma. Props @bordoni, @leoloso. [#265](https://github.com/10up/plugin-check/issues/265) * Fix - Include all strings that were missed in the previous release. Props @bordoni, @pixolin. [#270](https://github.com/10up/plugin-check/issues/270) -= [0.2.0] 2023-09-18 = += 0.2.0 = * Feature - Enable modification of the PHP Binary path used by the plugin with `PLUGIN_CHECK_PHP_BIN` constant. * Feature - Include a check for the usage of `ALLOW_UNFILTERED_UPLOADS` on any PHP files - Props EvanHerman at [#45](https://github.com/WordPress/plugin-check/pull/45) diff --git a/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-with-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-with-errors/load.php index 4f25b235c..27a0dbee4 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-with-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-with-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-without-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-without-errors/load.php index 68c7e685f..516930408 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-without-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-direct-db-queries-without-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-with-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-with-errors/load.php index 3819a378a..c7be3cd63 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-with-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-with-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-without-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-without-errors/load.php index a0b19de9a..6c8ec86e2 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-without-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-header-text-domain-without-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-errors/load.php index c84108e9d..fac96f410 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-without-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-without-errors/load.php index 61f4ee500..d9dcdd821 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-without-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-i18n-usage-without-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-ignore-directories/load.php b/tests/phpunit/testdata/plugins/test-plugin-ignore-directories/load.php index 2a449965a..1ef96e39d 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-ignore-directories/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-ignore-directories/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php index 28027083d..cef8b3a59 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-late-escaping-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-late-escaping-without-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-late-escaping-without-errors/load.php index 0ee421142..428ebe81e 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-late-escaping-without-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-late-escaping-without-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-errors/load.php index c8388c6cb..ab63621f5 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-without-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-without-errors/load.php index 8b7269f37..de978416f 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-without-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-performant-wp-query-params-without-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/load.php b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/load.php index b66761b87..54e552dc3 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/load.php @@ -5,7 +5,7 @@ * Description: Test plugin for the Readme check. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/readme.txt b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/readme.txt index cd9c68bca..d333eb6f0 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/readme.txt +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-default-text/readme.txt @@ -5,7 +5,7 @@ Contributors: plugin-check Requires at least: 6.0 Tested up to: 6.1 Requires PHP: 5.6 -Stable tag: n.e.x.t +Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Donate URL: https://example.com diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-empty-name/load.php b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-empty-name/load.php index 8322d468d..5da6bdae4 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-empty-name/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-empty-name/load.php @@ -5,7 +5,7 @@ * Description: Test plugin for the Readme check. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/load.php b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/load.php index 56e09726f..d79214263 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/load.php @@ -5,7 +5,7 @@ * Description: Test plugin for the Readme check. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/readme.txt b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/readme.txt index 100e7ff07..3ef42ac7e 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/readme.txt +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-invalid-name/readme.txt @@ -4,7 +4,7 @@ Contributors: plugin-check Requires at least: 6.0 Tested up to: 6.1 Requires PHP: 5.6 -Stable tag: n.e.x.t +Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: testing, security diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-readme/load.php b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-readme/load.php index 9e0ba90e2..f108041d4 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-readme/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-readme/load.php @@ -5,7 +5,7 @@ * Description: Test plugin for the Readme check. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-stable-tag/load.php b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-stable-tag/load.php index 95b5c91f2..e5e13dc5e 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-stable-tag/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-no-stable-tag/load.php @@ -5,7 +5,7 @@ * Description: Test plugin for the Readme check. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-stable-tag/load.php b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-stable-tag/load.php index 45e2da373..b4152bc25 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-stable-tag/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-plugin-readme-errors-stable-tag/load.php @@ -5,7 +5,7 @@ * Description: Test plugin for the Readme check. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-root-readme-without-errors/sub-directory/readme.txt b/tests/phpunit/testdata/plugins/test-plugin-root-readme-without-errors/sub-directory/readme.txt index cd9c68bca..d333eb6f0 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-root-readme-without-errors/sub-directory/readme.txt +++ b/tests/phpunit/testdata/plugins/test-plugin-root-readme-without-errors/sub-directory/readme.txt @@ -5,7 +5,7 @@ Contributors: plugin-check Requires at least: 6.0 Tested up to: 6.1 Requires PHP: 5.6 -Stable tag: n.e.x.t +Stable tag: 1.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Donate URL: https://example.com diff --git a/tests/phpunit/testdata/plugins/test-plugin-update-uri-header-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-update-uri-header-errors/load.php index e51cdc522..1998005a3 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-update-uri-header-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-update-uri-header-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-updater-file-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-updater-file-errors/load.php index d6289ee8d..80247f667 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-updater-file-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-updater-file-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-updater-routines-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-updater-routines-errors/load.php index b999cc6e0..d1e5c2bcc 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-updater-routines-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-updater-routines-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-updater-routines-regex-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-updater-routines-regex-errors/load.php index ac289cd51..de4d9d188 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-updater-routines-regex-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-updater-routines-regex-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-updaters-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-updaters-errors/load.php index dbb6f4fe2..c62e22d6f 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-updaters-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-updaters-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/testdata/plugins/test-plugin-updaters-regex-errors/load.php b/tests/phpunit/testdata/plugins/test-plugin-updaters-regex-errors/load.php index 14c7d2227..9dd9d91c8 100644 --- a/tests/phpunit/testdata/plugins/test-plugin-updaters-regex-errors/load.php +++ b/tests/phpunit/testdata/plugins/test-plugin-updaters-regex-errors/load.php @@ -5,7 +5,7 @@ * Description: Some plugin description. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: n.e.x.t + * Version: 1.0.0 * Author: WordPress Performance Team * Author URI: https://make.wordpress.org/performance/ * License: GPLv2 or later diff --git a/tests/phpunit/utils/TestCase/Runtime_Check_UnitTestCase.php b/tests/phpunit/utils/TestCase/Runtime_Check_UnitTestCase.php index 9d6f70705..03cd57571 100644 --- a/tests/phpunit/utils/TestCase/Runtime_Check_UnitTestCase.php +++ b/tests/phpunit/utils/TestCase/Runtime_Check_UnitTestCase.php @@ -20,7 +20,7 @@ abstract class Runtime_Check_UnitTestCase extends WP_UnitTestCase { /** * Gets the Check_Context for the plugin. * - * @since n.e.x.t + * @since 1.0.0 * * @param string $plugin_file The absolute path to the plugin main file. * @return Check_Context The check context for the plugin file. @@ -32,7 +32,7 @@ protected function get_context( $plugin_file ) { /** * Prepares the test environment by running all preparations. * - * @since n.e.x.t + * @since 1.0.0 * * @param Check $check The check to prepare the environment for. * @param Check_Context $context The check context to be checked. @@ -68,7 +68,7 @@ protected function prepare_environment( Check $check, Check_Context $context ) { /** * Prepares the test environment and runs the check returning the results. * - * @since n.e.x.t + * @since 1.0.0 * * @param Check $check The Check instance to run. * @param Check_Context $context The check context for the plugin to be checked. diff --git a/tests/phpunit/utils/Traits/With_Mock_Filesystem.php b/tests/phpunit/utils/Traits/With_Mock_Filesystem.php index f4b338bfe..2f73afa51 100644 --- a/tests/phpunit/utils/Traits/With_Mock_Filesystem.php +++ b/tests/phpunit/utils/Traits/With_Mock_Filesystem.php @@ -11,7 +11,7 @@ trait With_Mock_Filesystem { /** * Sets up a Mock Filesystem. * - * @since n.e.x.t + * @since 1.0.0 */ protected function set_up_mock_filesystem() { global $wp_filesystem; @@ -38,7 +38,7 @@ function () { /** * Sets up a failing Mock Filesystem. * - * @since n.e.x.t + * @since 1.0.0 */ protected function set_up_failing_mock_filesystem() { global $wp_filesystem;