62% wp-monitor

Code Review | WP Monitor

WordPress plugin WP Monitor scored 62% from 54 tests.

About plugin

  • Plugin page: wp-monitor
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 5.9.2
  • First release: Mar 26, 2017
  • Latest release: Jan 14, 2018
  • Number of updates: 43
  • Update frequency: every 6.8 days
  • Top authors: brothman01 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,055 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼2.29MB] [CPU: ▼338.15ms] Passed 4 tests

This is a short check of server-side resources used by WP Monitor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.447.37 ▼43.22
Dashboard /wp-admin2.09 ▼1.317.39 ▼23.99
Posts /wp-admin/edit.php2.09 ▼1.559.24 ▼28.12
Add New Post /wp-admin/post-new.php2.09 ▼4.887.43 ▼1,257.26
Media Library /wp-admin/upload.php2.09 ▼1.207.53 ▼15.76
WP Monitor /wp-admin/tools.php?page=options_page2.098.35

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 60 new files
Database: no new tables, 4 new options
New WordPress options
wpm_variables
wpm_config
wpm_update_info
wpm_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Monitor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,431 ▲68717.16 ▲1.5111.35 ▲5.093.58 ▲1.35
Dashboard /wp-admin3,612 ▲7547.37 ▲1.22162.82 ▲23.45197.22 ▲34.96
Posts /wp-admin/edit.php2,690 ▼43.23 ▼0.0169.43 ▲4.35133.89 ▼8.56
Add New Post /wp-admin/post-new.php1,782 ▲12121.39 ▲5.59424.63 ▲6.98146.34 ▼3.95
Media Library /wp-admin/upload.php1,703 ▲85.50 ▼0.02141.52 ▲7.07185.99 ▼5.05
WP Monitor /wp-admin/tools.php?page=options_page1,0132.4161.02123.02

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-monitor/class-wpmonitor.php+485
    Undefined index: 7.4
  • Zombie WordPress options were found after uninstall: 4 options
    • wpm_update_info
    • wpm_variables
    • wpm_options
    • wpm_config

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=options_page
    • > Notice in wp-content/plugins/wp-monitor/class-wpmonitor.php+485
    Undefined index: 7.4
    • > GET request to /wp-admin/tools.php?page=options_page
    • > Notice in wp-content/plugins/wp-monitor/class-wpmonitor.php+487
    Trying to access array offset on value of type null

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-monitor/class-wpmonitor.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WPMonitor' not found in wp-content/plugins/wp-monitor/class-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPMonitor' not found in wp-content/plugins/wp-monitor/class-phpversioner.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #2, #3 in wp-monitor/assets to your readme.txt
You can take inspiration from this readme.txt

wp-monitor/class-wpmonitor.php 92% from 13 tests

Analyzing the main PHP file in "WP Monitor" version 1.1.4
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-monitor.php" instead of "class-wpmonitor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin10,435 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS482392,593
Sass1434341,768
LESS1434441,758
JavaScript15258246927
PHP3432202718

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity20.33
▷ Minimum class complexity6.00
▷ Maximum class complexity45.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
library/images/no-mail.png1.39KB1.39KB0.21%
library/images/yes-mail.png0.55KB0.55KB0.00%