84% servermonitor

Code Review | ServerMonitor

WordPress plugin ServerMonitor scored84%from 54 tests.

About plugin

  • Plugin page: servermonitor
  • Plugin version: 0.3.6
  • PHP compatiblity: 5.1.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.9.5
  • WordPress version: 6.3.1
  • First release: Apr 6, 2018
  • Latest release: Apr 7, 2018
  • Number of updates: 13
  • Update frequency: every 0.2 days
  • Top authors: fs1995 (92.31%)Otto42 (15.38%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,583 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼5.41ms] Passed 4 tests

Server-side resources used by ServerMonitor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.39 ▼7.59
Dashboard /wp-admin3.34 ▲0.0444.04 ▼0.48
Posts /wp-admin/edit.php3.39 ▲0.0348.08 ▲4.14
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.93 ▼10.64
Media Library /wp-admin/upload.php3.27 ▲0.0333.06 ▼2.92
Resource Monitor /wp-admin/admin.php?page=servermonitor3.2430.65
PHP error log /wp-admin/admin.php?page=servermonitor-php3.2330.04
Clear cache /wp-admin/admin.php?page=servermonitor-cache3.2329.05
System Info /wp-admin/admin.php?page=servermonitor-info3.2325.23

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

ServerMonitor: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.26 ▼1.121.69 ▼0.1143.21 ▲0.04
Dashboard /wp-admin2,254 ▲635.90 ▲1.03105.57 ▼0.1439.67 ▼2.53
Posts /wp-admin/edit.php2,144 ▲552.01 ▲0.0140.62 ▲5.2035.40 ▼5.00
Add New Post /wp-admin/post-new.php1,542 ▲1417.82 ▼0.32637.40 ▲34.9953.42 ▼7.54
Media Library /wp-admin/upload.php1,439 ▲544.20 ▼0.1196.05 ▼1.8143.24 ▼0.39
Resource Monitor /wp-admin/admin.php?page=servermonitor1,1082.3964.0731.92
PHP error log /wp-admin/admin.php?page=servermonitor-php8002.0423.8126.89
Clear cache /wp-admin/admin.php?page=servermonitor-cache8112.0623.6425.52
System Info /wp-admin/admin.php?page=servermonitor-info8052.0725.2224.07

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/servermonitor/uninstall.php
    • > /wp-content/plugins/servermonitor/api.php
    • > /wp-content/plugins/servermonitor/servermonitor.php
    • > /wp-content/plugins/servermonitor/monitor.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: debug, server info, memory, disk space, information...

servermonitor/servermonitor.php Passed 13 tests

The entry point to "ServerMonitor" version 0.3.6 is a PHP file that has certain tags in its header comment area
99 characters long description:
A simple plugin to view server resource usage (ram, cpu, disk), check your PHP error log, and more.

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 plugin315 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP43722246
JavaScript3171760
CSS2019

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pct.png0.37KB0.38KB0.00%
images/pixel.png0.09KB0.09KB0.00%
images/sec.png0.53KB0.55KB0.00%