89% server-monitor

Code Review | Server Monitor

WordPress plugin Server Monitor scored89%from 54 tests.

About plugin

  • Plugin page: server-monitor
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Oct 1, 2014
  • Latest release: Dec 20, 2014
  • Number of updates: 15
  • Update frequency: every 5.3 days
  • Top authors: vendocrat (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /5,384 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲2.45ms] Passed 4 tests

An overview of server-side resources used by Server Monitor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.85 ▲0.12
Dashboard /wp-admin3.38 ▲0.0874.62 ▲23.19
Posts /wp-admin/edit.php3.48 ▲0.1348.97 ▲3.56
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.30 ▲2.73
Media Library /wp-admin/upload.php3.29 ▲0.0635.70 ▲3.40

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Server Monitor: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲32613.68 ▼0.701.77 ▲0.1339.48 ▼6.35
Dashboard /wp-admin2,467 ▲2794.90 ▼0.03113.86 ▼0.0846.00 ▼0.54
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0241.48 ▲0.9840.16 ▲5.63
Add New Post /wp-admin/post-new.php1,545 ▲1118.12 ▼5.08617.65 ▼23.0853.57 ▼0.61
Media Library /wp-admin/upload.php1,391 ▲64.21 ▲0.0394.90 ▼7.6139.53 ▼5.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Widget #3)
Please take inspiration from this readme.txt

server-monitor/vendocrat-server-monitor.php 85% from 13 tests

The principal PHP file in "Server Monitor" v. 0.2.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 168 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("server-monitor.php" instead of "vendocrat-server-monitor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected504 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP293209250
PO File377106204
Markdown121050

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png9.11KB6.39KB▼ 29.90%
screenshot-1.png8.34KB5.75KB▼ 31.01%
screenshot-3.png9.10KB6.52KB▼ 28.37%