78% health-check

Code Review | Health Check & Troubleshooting

WordPress plugin Health Check & Troubleshooting scored78%from 54 tests.

About plugin

  • Plugin page: health-check
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Jun 9, 2018
  • Latest release: Aug 6, 2023
  • Number of updates: 244
  • Update frequency: every 20.6 days
  • Top authors: Clorith (33.61%)Denis-de-Bernardy (32.79%)westi (31.56%)pento (2.46%)sudar (1.23%)

Code review

54 tests

User reviews

152 reviews

Install metrics

300,000+ active /4,075,799 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.47MB] [CPU: ▼2.79ms] Passed 4 tests

This is a short check of server-side resources used by Health Check & Troubleshooting
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.4961.25 ▲19.67
Dashboard /wp-admin3.81 ▲0.5157.41 ▲6.19
Posts /wp-admin/edit.php3.86 ▲0.5152.92 ▼4.06
Add New Post /wp-admin/post-new.php6.34 ▲0.4586.81 ▼23.06
Media Library /wp-admin/upload.php3.67 ▲0.4446.10 ▲9.78

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Health Check & Troubleshooting
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.54 ▲0.271.82 ▼0.1652.78 ▲10.76
Dashboard /wp-admin2,198 ▲215.61 ▲0.0189.21 ▲2.5141.48 ▼5.45
Posts /wp-admin/edit.php2,100 ▼31.97 ▲0.0133.69 ▼7.3935.02 ▼2.58
Add New Post /wp-admin/post-new.php1,526 ▼323.36 ▼0.20682.47 ▲63.4657.91 ▲10.16
Media Library /wp-admin/upload.php1,400 ▲64.27 ▲0.09101.48 ▼3.9243.78 ▼1.76

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 22× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/health-check/HealthCheck/class-health-check-troubleshoot.php
    • > /wp-content/plugins/health-check/HealthCheck/Tools/class-health-check-htaccess.php
    • > /wp-content/plugins/health-check/health-check.php
    • > /wp-content/plugins/health-check/HealthCheck/class-health-check.php
    • > /wp-content/plugins/health-check/HealthCheck/class-health-check-screenshots.php
    • > /wp-content/plugins/health-check/pages/phpinfo.php
    • > /wp-content/plugins/health-check/HealthCheck/Tools/class-health-check-phpinfo.php
    • > /wp-content/plugins/health-check/pages/screenshots.php
    • > /wp-content/plugins/health-check/HealthCheck/Tools/class-health-check-mail-check.php
    • > /wp-content/plugins/health-check/mu-plugin/health-check-troubleshooting-mode.php
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/health-check/compat.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Health_Check_Tool' not found in wp-content/plugins/health-check/HealthCheck/Tools/class-health-check-plugin-compatibility.php:3
    • > PHP Notice
      Undefined variable: wp_version in wp-content/plugins/health-check/compat.php on line 244
    • > PHP Notice
      Undefined variable: wp_version in wp-content/plugins/health-check/compat.php on line 219
    • > PHP Notice
      Undefined variable: wp_version in wp-content/plugins/health-check/compat.php on line 208
    • > PHP Fatal error
      Uncaught Error: Class 'Health_Check_Tool' not found in wp-content/plugins/health-check/HealthCheck/Tools/class-health-check-debug-log-viewer.php:3
    • > PHP Notice
      Undefined variable: wp_version in wp-content/plugins/health-check/compat.php on line 90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/health-check/HealthCheck/BackCompat/class-wp-site-health.php:17
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/health-check/compat.php on line 4
    • > PHP Notice
      Undefined variable: wp_version in wp-content/plugins/health-check/compat.php on line 152

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: health check

health-check/health-check.php Passed 13 tests

"Health Check & Troubleshooting" version 1.7.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
44 characters long description:
Checks the health of your WordPress install.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin4,226 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP339261,2264,221
JavaScript4004
CSS1001

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 134)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity26.17
▷ Minimum class complexity1.00
▷ Maximum class complexity155.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes18
▷ Abstract classes15.56%
▷ Concrete classes1794.44%
▷ Final classes00.00%
Methods119
▷ Static methods1915.97%
▷ Public methods11495.80%
▷ Protected methods00.00%
▷ Private methods54.20%
Functions13
▷ Named functions861.54%
▷ Anonymous functions538.46%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin