WPThemeReview icon indicating copy to clipboard operation
WPThemeReview copied to clipboard

PHP_CodeSniffer rules (sniffs) to enforce WordPress theme review coding conventions

Results 55 WPThemeReview issues
Sort by recently updated
recently updated
newest added

Doing external file gets for a version number that hasn't changed in 4 years is more than a waste, it creates crashes, when all we need to do is update...

Possible fix for #254

Adds sniffs for `language_attributes()` and `body_class()` usage. `language_attributes()` requirement in: https://make.wordpress.org/themes/handbook/review/required/#code `body_class()` requirement in: https://make.wordpress.org/themes/handbook/review/required/#templates I think we should probably change the organization of the handbook, and add `language_attributes()` to...

enhancement
help wanted
pr: needs review
approved / in handbook

Detached the two new sniffs from #239 and add them here. Short ternary addition seems like it promotes best practices, and escaped not translated sniff seems like a useful sniff...

enhancement

This was discussed and decided in yesterday's meeting. Checks for `add_menu_page` and `add_submenu_page` should now be removed.

#### Rule: **WARNING** : Using a CDN is discouraged. All JS and CSS should be bundled. Ref: https://make.wordpress.org/themes/handbook/review/required/#stylesheets-and-scripts #### Theme check file covering this rule: https://github.com/Otto42/theme-check/blob/master/checks/cdn.php #### To do: -...

help wanted
issue: needs PR

#### Rule: Removal of WP admin pages is not allowed. The exception would be a child theme removing a theme admin submenu page added by the parent theme. Ref: https://github.com/WPTRT/WordPress-Coding-Standards/issues/12#issuecomment-231783316...

low priority
good first issue

[New sniff] Check to ensure searchform.php is not loaded directly. #### Rule type: Error #### Rule: > Standard templates should be called by their respective function. Ref: https://make.wordpress.org/themes/handbook/review/required/#templates ERROR |...

enhancement
help wanted
approved / in handbook

#### Rule type: Error / Warning #### Rule: Check for incorrect usage of certain parameters in WP functions (hard-coded) and provide valid alternatives based on the parameter passed. > hardcoded...

issue: input/decision needed
low priority
good first issue
issue: needs PR

In https://github.com/WPTRT/WPThemeReview/blob/develop/WPThemeReview/Sniffs/PluginTerritory/ForbiddenFunctionsSniff.php The sniff for regestering blocks is too strict. The existing sniff is for `'register_block_*',` so an error is shown for `register_block_style().` `register_block_style()` is allowed in themes, so it...

issue: bug
enhancement
approved / in handbook
good first issue