72% tnm-server-status-and-load-average

Code Review | [TNM] Server Status and Load Average

WordPress plugin [TNM] Server Status and Load Average scored72%from 54 tests.

About plugin

  • Plugin page: tnm-server-status...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: Dec 3, 2015
  • Number of updates: 9
  • Update frequency: every 3.8 days
  • Top authors: chriserk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.99ms] Passed 4 tests

Analyzing server-side resources used by [TNM] Server Status and Load Average
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.62 ▼3.15
Dashboard /wp-admin3.29 ▼0.0545.06 ▼25.23
Posts /wp-admin/edit.php3.37 ▲0.0148.36 ▼4.19
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.12 ▲0.63
Media Library /wp-admin/upload.php3.24 ▲0.0139.03 ▲5.01
[TNM] Server Status /wp-admin/options-general.php?page=tnm_server_status3.1829.31

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by [TNM] Server Status and Load Average
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,179 ▼56712.42 ▼2.162.26 ▲0.3541.46 ▼1.63
Dashboard /wp-admin1,576 ▼6151.38 ▼3.5313.67 ▼97.0233.72 ▼6.49
Posts /wp-admin/edit.php2,109 ▲172.05 ▼0.0142.60 ▲1.6843.50 ▲6.46
Add New Post /wp-admin/post-new.php1,701 ▲18223.90 ▲0.97665.81 ▼11.4739.65 ▼13.30
Media Library /wp-admin/upload.php1,408 ▲174.26 ▲0.07104.29 ▼1.9244.03 ▼1.88
[TNM] Server Status /wp-admin/options-general.php?page=tnm_server_status8392.1025.8242.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tnm_server_status
    • > Notice in wp-content/plugins/tnm-server-status-and-load-average/tnm-server-status.php+173
    Trying to access array offset on value of type bool

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tnm-server-status-and-load-average/tnm-server-status.php:83

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=tnm_server_status
    • > Network (severe)
    wp-content/plugins/tnm-server-status/tnm-server-status.php?la=true - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Wordpress Server Load Admin Widget with load average in admin bar) image not found
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === tnm-server-status-and-load-average === )
You can look at the official readme.txt

tnm-server-status-and-load-average/tnm-server-status.php 92% from 13 tests

The main file in "[TNM] Server Status and Load Average" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tnm-server-status-and-load-average.php" instead of "tnm-server-status.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin218 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19610218

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
tnm-server-status.png21.63KB8.01KB▼ 62.96%