10% server-status-for-minecraft-pc-pe

Code Review | Server Status For Minecraft PC & PE (MCServerStatus)

WordPress plugin Server Status For Minecraft PC & PE (MCServerStatus) scored10%from 54 tests.

About plugin

  • Plugin page: server-status-for...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.7
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Aug 1, 2018
  • Number of updates: 31
  • Update frequency: every 22.1 days
  • Top authors: GoneTone (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /13,366 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/server-status-for-minecraft-pc-pe/widget.php+60
    Declaration of MCServerStatus_Widget::widget(array $args, array $instance) should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.90MB] [CPU: ▼58.32ms] Passed 4 tests

Analyzing server-side resources used by Server Status For Minecraft PC & PE (MCServerStatus)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.35 ▼42.13
Dashboard /wp-admin2.10 ▼1.206.73 ▼51.87
Posts /wp-admin/edit.php2.11 ▼1.256.58 ▼45.68
Add New Post /wp-admin/post-new.php2.11 ▼3.786.31 ▼93.58
Media Library /wp-admin/upload.php2.11 ▼1.126.23 ▼31.99

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_mcserverstatus
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Server Status For Minecraft PC & PE (MCServerStatus): an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▲0.101.80 ▼0.4740.81 ▼6.17
Dashboard /wp-admin2,198 ▲185.72 ▲0.1188.71 ▼15.6039.88 ▼5.73
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0038.27 ▲3.7838.04 ▼0.16
Add New Post /wp-admin/post-new.php1,536 ▲723.30 ▲0.15670.48 ▲22.4353.74 ▼0.35
Media Library /wp-admin/upload.php1,397 ▼04.28 ▲0.0997.15 ▼16.9543.67 ▼5.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/server-status-for-minecraft-pc-pe/widget.php+60
    Declaration of MCServerStatus_Widget::widget(array $args, array $instance) should be compatible with WP_Widget::widget($args, $instance)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_mcserverstatus
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/offline.php
    • > /wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/online.php
    • > /wp-content/plugins/server-status-for-minecraft-pc-pe/templates/widget.php
  • 45× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/online.php on line 5
    • > PHP Notice
      Undefined variable: queryServer in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/widget.php on line 2
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/offline.php on line 5
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/online.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/online.php on line 4
    • > PHP Notice
      Undefined variable: pingServer in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/widget.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/server-status-for-minecraft-pc-pe/libs/Widgetize.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/offline.php on line 29
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/offline.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/server-status-for-minecraft-pc-pe/templates/partials/offline.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt might help

server-status-for-minecraft-pc-pe/widget.php 92% from 13 tests

The main PHP file in "Server Status For Minecraft PC & PE (MCServerStatus)" ver. 1.3.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("server-status-for-minecraft-pc-pe.php" instead of "widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,834 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP121951191,072
PO File5342415733
Markdown18029

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.44
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods33
▷ Static methods13.03%
▷ Public methods2369.70%
▷ Protected methods13.03%
▷ Private methods927.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin