89% my-wp-health-check

Code Review | SiteAlert - Uptime, Speed, and Security Monitoring for WordPress

WordPress plugin SiteAlert - Uptime, Speed, and Security Monitoring for WordPress scored 89% from 54 tests.

About plugin

  • Plugin page: my-wp-health-check
  • Plugin version: 1.9.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9
  • WordPress version: 5.8.1
  • First release: Feb 11, 2015
  • Latest release: Feb 21, 2022
  • Number of updates: 209
  • Update frequency: every 12.3 days
  • Top authors: fpcorso (90.91%)sitealert (9.57%)

Code review

54 tests

User reviews

298 reviews

Install metrics

9,000+ active / 242,560 total downloads

Benchmarks

Plugin footprint 82% 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.29MB] [CPU: ▼149.77ms] 75% from 4 tests

Analyzing server-side resources used by SiteAlert - Uptime, Speed, and Security Monitoring for WordPress
The following require your attention
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,440.51ms on /wp-admin/tools.php?page=sitealert-checks)
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.3130.18 ▲6.90
Dashboard /wp-admin3.38 ▲0.3239.65 ▼16.66
Posts /wp-admin/edit.php3.43 ▲0.3336.53 ▲2.97
Add New Post /wp-admin/post-new.php5.68 ▲0.2582.19 ▼585.29
Media Library /wp-admin/upload.php3.27 ▲0.2629.22 ▼0.08
SiteAlert /wp-admin/tools.php?page=sitealert-checks4.941,440.51

Server storage [IO: ▲0.11MB] [DB: ▲0.18MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 4 new options
New WordPress options
wphc_current_version
wphc_review_message_trigger
wphc_original_version
wphc_install_timestamp

Browser metrics Passed 4 tests

SiteAlert - Uptime, Speed, and Security Monitoring for WordPress: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,751 ▲15016.07 ▲0.418.49 ▲2.8573.45 ▼19.05
Dashboard /wp-admin2,975 ▲796.09 ▼0.16117.10 ▼19.69166.74 ▼34.25
Posts /wp-admin/edit.php2,790 ▲503.37 ▲0.1264.75 ▼0.20136.49 ▼2.04
Add New Post /wp-admin/post-new.php3,833 ▲2618.76 ▼0.32426.44 ▼28.08162.23 ▼2.28
Media Library /wp-admin/upload.php1,800 ▲515.54 ▲0.10143.13 ▼8.67183.07 ▲5.12
SiteAlert /wp-admin/tools.php?page=sitealert-checks1,5983.1265.16189.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 2 options in the database
    • wphc_original_version
    • wphc_current_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: email, uptime, blacklist, monitor, security

my-wp-health-check/mlw_health_check.php 92% from 13 tests

The principal PHP file in "SiteAlert - Uptime, Speed, and Security Monitoring for WordPress" v. 1.9.7 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("my-wp-health-check.php" instead of "mlw_health_check.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,955 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP131826041,338
Markdown2830313
JavaScript1817164
CSS1241140

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.83
▷ Minimum class complexity4.00
▷ Maximum class complexity80.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods53
▷ Static methods916.98%
▷ Public methods4279.25%
▷ Protected methods00.00%
▷ Private methods1120.75%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin