84% theme-check

Code Review | Theme Check

WordPress plugin Theme Check scored 84% from 54 tests.

About plugin

  • Plugin page: theme-check
  • Plugin version: 20230417...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2018
  • Latest release: Apr 17, 2023
  • Number of updates: 347
  • Update frequency: every 13.1 days
  • Top authors: pross (58.21%)Otto42 (40.35%)githubsync (2.02%)

Code review

54 tests

User reviews

193 reviews

Install metrics

30,000+ active / 2,293,401 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.90ms] Passed 4 tests

This is a short check of server-side resources used by Theme Check
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0239.96 ▼0.71
Dashboard /wp-admin3.32 ▲0.0243.27 ▼7.79
Posts /wp-admin/edit.php3.37 ▲0.0245.03 ▲1.79
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.61 ▼9.10
Media Library /wp-admin/upload.php3.24 ▲0.0232.96 ▼2.00
Theme Check /wp-admin/themes.php?page=themecheck4.0736.24

Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Theme Check
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.33 ▼1.071.69 ▼0.0840.31 ▼8.36
Dashboard /wp-admin2,210 ▲225.90 ▲1.05105.96 ▼9.6438.68 ▼10.21
Posts /wp-admin/edit.php2,090 ▲12.02 ▲0.0239.21 ▼0.2634.25 ▲0.14
Add New Post /wp-admin/post-new.php1,545 ▲318.32 ▼0.01639.41 ▲6.4160.79 ▲8.43
Media Library /wp-admin/upload.php1,392 ▲44.21 ▼0.0197.44 ▼1.9342.46 ▼2.22
Theme Check /wp-admin/themes.php?page=themecheck8482.0225.5632.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 61× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-link-check.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-directories-check.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-version-php-check.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-theme-support-title-tag.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-included-zip-check.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-image-size-check.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-bad-things-check.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-gravatar-check.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-script-tag-check.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'themecheck' not found in wp-content/plugins/theme-check/checks/class-i18n-check.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: themes, guidelines, wordpressorg

theme-check/theme-check.php 92% from 13 tests

The principal PHP file in "Theme Check" v. 20230417... is loaded by WordPress automatically on each request
The following require your attention:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "20230417...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected4,541 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP626571,8254,391
CSS10083
Markdown240067

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity6.47
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes60
▷ Abstract classes00.00%
▷ Concrete classes60100.00%
▷ Final classes00.00%
Methods137
▷ Static methods00.00%
▷ Public methods13497.81%
▷ Protected methods00.00%
▷ Private methods32.19%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/gray-grad.png0.21KB0.18KB▼ 11.74%