78% atr-server-status

Code Review | ATR Server Status

WordPress plugin ATR Server Status scored 78% from 54 tests.

About plugin

  • Plugin page: atr-server-status
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.1
  • WordPress version: 5.8.1
  • First release: Mar 27, 2017
  • Latest release: Aug 31, 2021
  • Number of updates: 62
  • Update frequency: every 26.1 days
  • Top authors: rehhoff (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

300+ active / 4,854 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼139.49ms] Passed 4 tests

A check of server-side resources used by ATR Server Status
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.1745.72 ▲10.64
Dashboard /wp-admin3.22 ▲0.1752.20 ▲8.02
Posts /wp-admin/edit.php3.33 ▲0.2348.71 ▼0.09
Add New Post /wp-admin/post-new.php5.58 ▲0.1596.49 ▼569.03
Media Library /wp-admin/upload.php3.17 ▲0.1639.12 ▲3.15
Configurations /wp-admin/admin.php?page=ass-admin-config3.1431.33
Server status /wp-admin/admin.php?page=ass-admin-servers3.1931.56

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 1 new option
New WordPress options
widget_serverstatuswidget

Browser metrics Passed 4 tests

An overview of browser requirements for ATR Server Status
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,857 ▲26116.22 ▲0.3612.93 ▲4.4052.64 ▼0.52
Dashboard /wp-admin3,006 ▲755.90 ▼0.03148.91 ▼3.99113.75 ▼9.89
Posts /wp-admin/edit.php2,775 ▲362.69 ▲0.0168.13 ▲2.9090.44 ▼2.50
Add New Post /wp-admin/post-new.php1,628 ▲12818.91 ▲0.11397.63 ▲6.38116.51 ▼3.88
Media Library /wp-admin/upload.php1,843 ▲365.03 ▲0.02169.37 ▼9.52123.69 ▼10.45
Configurations /wp-admin/admin.php?page=ass-admin-config1,4392.3767.5383.00
Server status /wp-admin/admin.php?page=ass-admin-servers1,3552.4365.4083.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_serverstatuswidget

Smoke tests 50% 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 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
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/atr-server-status/include/functions.php
    • > /wp-content/plugins/atr-server-status/atr-server-status.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atr-server-status/include/post-types.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/atr-server-status/templates/wp-footer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ATR\\Settings' not found in wp-content/plugins/atr-server-status/templates/admin-config.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atr-server-status/include/plugin-compatibility/acf-extended.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atr-server-status/include/plugin-compatibility/dark-mode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/atr-server-status/include/compatibility.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/atr-server-status/libraries/httprequest/tests/HttpRequestTest.php:41
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/atr-server-status/templates/view-servers.php on line 1
    • > PHP Notice
      Undefined variable: servers in wp-content/plugins/atr-server-status/templates/view-servers.php on line 1
    • > PHP Notice
      Undefined variable: servers in wp-content/plugins/atr-server-status/templates/wp-footer.php on line 2

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: The official readme.txt might help

atr-server-status/atr-server-status.php Passed 13 tests

The primary PHP file in "ATR Server Status" version 1.5.1 is used by WordPress to initiate all plugin functionality
69 characters long description:
Allow your visitors to check your servers/service status in realtime.

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
No dangerous file extensions were detected1,659 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP232605211,362
CSS210153
JavaScript313670
Markdown310040
JSON10027
XML1007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.56
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods82
▷ Static methods67.32%
▷ Public methods8097.56%
▷ Protected methods11.22%
▷ Private methods11.22%
Functions36
▷ Named functions1233.33%
▷ Anonymous functions2466.67%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png56.22KB24.79KB▼ 55.89%
assets/screenshot-2.png24.66KB11.10KB▼ 55.00%