79% monitoringplus

Code Review | MonitoringPlus

WordPress plugin MonitoringPlus scored79%from 54 tests.

About plugin

  • Plugin page: monitoringplus
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.7.2
  • WordPress version: 6.3.1
  • First release: Dec 9, 2016
  • Latest release: Oct 31, 2017
  • Number of updates: 12
  • Update frequency: every 26.8 days
  • Top authors: startupplus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /931 total downloads

Benchmarks

Plugin footprint 65% 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.01MB] [CPU: ▼11.63ms] Passed 4 tests

An overview of server-side resources used by MonitoringPlus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.17 ▲1.27
Dashboard /wp-admin3.32 ▼0.0249.33 ▼12.46
Posts /wp-admin/edit.php3.37 ▲0.0244.19 ▼5.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0278.31 ▼29.50
Media Library /wp-admin/upload.php3.24 ▲0.0236.41 ▲2.47

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for MonitoringPlus
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8914.64 ▲0.292.12 ▲0.5143.38 ▲1.20
Dashboard /wp-admin2,222 ▲425.72 ▲0.0999.16 ▲13.9147.08 ▲5.35
Posts /wp-admin/edit.php2,127 ▲272.05 ▲0.0340.01 ▲0.1939.19 ▲7.19
Add New Post /wp-admin/post-new.php1,558 ▲3223.41 ▲0.27676.61 ▲79.0152.60 ▼1.42
Media Library /wp-admin/upload.php1,433 ▲334.23 ▲0.0498.33 ▼1.0847.53 ▲5.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/monitoringplus/src/StartupPlus/MonitoringPlus/WordPress/MonitoringPlusAPI.php+197
    Use of undefined constant WordPress - assumed 'WordPress' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

monitoringplus/plugin.php 85% from 13 tests

This is the main PHP file of "MonitoringPlus" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("monitoringplus.php" instead of "plugin.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 197 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,124 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10197550721
JavaScript21656402
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.00
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods66
▷ Static methods4872.73%
▷ Public methods5075.76%
▷ Protected methods00.00%
▷ Private methods1624.24%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/img/page_titile_logo.png0.59KB0.25KB▼ 58.37%
static/img/admin-bar-icon_large.png0.26KB0.17KB▼ 35.79%
static/img/admin-bar-icon.png0.22KB0.15KB▼ 33.04%