├── templates
├── results-complete.php
├── results-row.php
├── results-table.php
└── admin-page.php
├── behat.yml
├── includes
├── Checker
│ ├── Static_Check.php
│ ├── Runtime_Check.php
│ ├── Check_Context.php
│ ├── Preparation.php
│ ├── With_Shared_Preparations.php
│ ├── Checks
│ │ ├── I18n_Usage_Check.php
│ │ ├── Late_Escaping_Check.php
│ │ ├── Plugin_Review_PHPCS_Check.php
│ │ ├── Enqueued_Scripts_In_Footer_Check.php
│ │ ├── Performant_WP_Query_Params_Check.php
│ │ ├── Abstract_Runtime_Check.php
│ │ ├── Localhost_Check.php
│ │ ├── No_Unfiltered_Uploads_Check.php
│ │ ├── Plugin_Header_Text_Domain_Check.php
│ │ ├── Code_Obfuscation_Check.php
│ │ ├── Plugin_Readme_Check.php
│ │ ├── Abstract_PHP_CodeSniffer_Check.php
│ │ ├── File_Type_Check.php
│ │ ├── Plugin_Updater_Check.php
│ │ ├── Enqueued_Scripts_Size_Check.php
│ │ ├── Enqueued_Styles_Scope_Check.php
│ │ └── Abstract_File_Check.php
│ ├── Check_Runner.php
│ ├── Check_Repository.php
│ ├── Check.php
│ ├── Preparations
│ │ ├── Demo_Posts_Creation_Preparation.php
│ │ ├── Universal_Runtime_Preparation.php
│ │ ├── Force_Single_Plugin_Preparation.php
│ │ └── Use_Minimal_Theme_Preparation.php
│ ├── Check_Categories.php
│ ├── Checks.php
│ ├── Check_Collection.php
│ ├── Default_Check_Repository.php
│ ├── AJAX_Runner.php
│ ├── CLI_Runner.php
│ ├── Check_Result.php
│ ├── Runtime_Environment_Setup.php
│ └── Default_Check_Collection.php
├── Traits
│ ├── Stable_Check.php
│ ├── Experimental_Check.php
│ ├── Find_Readme.php
│ ├── Amend_Check_Result.php
│ ├── File_Editor_URL.php
│ └── URL_Aware.php
├── Plugin_Main.php
├── Plugin_Context.php
├── Utilities
│ └── Plugin_Request_Utility.php
└── Admin
│ └── Admin_Page.php
├── test-content
└── themes
│ └── wp-empty-theme
│ ├── style.css
│ ├── searchform.php
│ ├── footer.php
│ ├── header.php
│ ├── inc
│ ├── template-functions.php
│ ├── back-compat.php
│ └── template-tags.php
│ ├── comments.php
│ ├── min-style.css
│ ├── index.php
│ └── functions.php
├── patches
└── @wordpress+env+8.11.0.patch
├── codecov.yml
├── phpmd.xml
├── cli.php
├── drop-ins
└── object-cache.copy.php
├── plugin-check.php
├── phpcs-rulesets
└── plugin-review.xml
└── readme.txt
/templates/results-complete.php:
--------------------------------------------------------------------------------
1 |
2 |
{{ data.message }}
3 |
4 |
--------------------------------------------------------------------------------
/behat.yml:
--------------------------------------------------------------------------------
1 | default:
2 | suites:
3 | default:
4 | contexts:
5 | - WordPress\Plugin_Check\Behat_Utils\FeatureContext
6 | paths:
7 | - tests/behat/features
8 |
--------------------------------------------------------------------------------
/includes/Checker/Static_Check.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{data.line}}
4 | |
5 |
6 | {{data.column}}
7 | |
8 |
9 | {{data.type}}
10 | |
11 |
12 | {{data.code}}
13 | |
14 |
15 | {{data.message}}
16 | |
17 | <# if ( data.hasLinks ) { #>
18 |
19 | <# if ( data.link ) { #>
20 |
21 |
22 |
23 |
24 | <# } #>
25 | |
26 | <# } #>
27 |
28 |
29 |
--------------------------------------------------------------------------------
/includes/Checker/Preparation.php:
--------------------------------------------------------------------------------
1 | $constructor_args pairs. If the class does not
23 | * need any constructor arguments, it would just be an empty array.
24 | */
25 | public function get_shared_preparations();
26 | }
27 |
--------------------------------------------------------------------------------
/templates/results-table.php:
--------------------------------------------------------------------------------
1 | {{ data.file }}
2 |
3 |
4 |
5 | |
6 |
7 | |
8 |
9 |
10 | |
11 |
12 |
13 | |
14 |
15 |
16 | |
17 |
18 |
19 | |
20 | <# if ( data.hasLinks ) { #>
21 |
22 |
23 | |
24 | <# } #>
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/test-content/themes/wp-empty-theme/searchform.php:
--------------------------------------------------------------------------------
1 |
12 |
19 |
--------------------------------------------------------------------------------
/patches/@wordpress+env+8.11.0.patch:
--------------------------------------------------------------------------------
1 | diff --git a/node_modules/@wordpress/env/lib/init-config.js b/node_modules/@wordpress/env/lib/init-config.js
2 | index 318bcae..8628137 100644
3 | --- a/node_modules/@wordpress/env/lib/init-config.js
4 | +++ b/node_modules/@wordpress/env/lib/init-config.js
5 | @@ -244,14 +244,6 @@ RUN export COMPOSER_HASH=\`curl -sS https://composer.github.io/installer.sig\` &
6 | RUN php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer
7 | RUN rm /tmp/composer-setup.php`;
8 |
9 | - // Install any Composer packages we might need globally.
10 | - // Make sure to do this as the user and ensure the binaries are available in the $PATH.
11 | - dockerFileContent += `
12 | -USER $HOST_UID:$HOST_GID
13 | -ENV PATH="\${PATH}:/home/$HOST_USERNAME/.composer/vendor/bin"
14 | -RUN composer global require --dev phpunit/phpunit:"^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
15 | -USER root`;
16 | -
17 | return dockerFileContent;
18 | }
19 |
20 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | # Overall settings for PR integration via codecov.io
2 | # See https://docs.codecov.com/docs/codecovyml-reference
3 |
4 | # Separate PR statuses for project-level and patch-level coverage
5 | # See https://docs.codecov.com/docs/commit-status
6 | coverage:
7 | status:
8 | # Project-level coverage
9 | project:
10 | default:
11 | base: auto
12 | # Disable once code base is more mature.
13 | informational: true
14 | only_pulls: true
15 | target: auto
16 | threshold: 5%
17 |
18 | # Patch-level coverage (how well is the PR tested)
19 | patch:
20 | default:
21 | base: auto
22 | informational: true
23 | only_pulls: true
24 | target: auto
25 | threshold: 50%
26 |
27 | # Pull request comments
28 | # See https://docs.codecov.com/docs/pull-request-comments
29 | comment: false
30 |
31 | # See https://docs.codecov.com/docs/ignoring-paths
32 | ignore:
33 | - drop-ins
34 | - test-content
35 | - tests
36 |
--------------------------------------------------------------------------------
/includes/Checker/Checks/I18n_Usage_Check.php:
--------------------------------------------------------------------------------
1 | 'php',
45 | 'standard' => 'WordPress',
46 | 'sniffs' => 'WordPress.WP.I18n',
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/includes/Checker/Check_Runner.php:
--------------------------------------------------------------------------------
1 | 'php',
45 | 'standard' => 'WordPress',
46 | 'sniffs' => 'WordPress.Security.EscapeOutput',
47 | );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/test-content/themes/wp-empty-theme/footer.php:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
40 |
41 |
42 |
43 |
44 |
45 |