10% minecraftserverstatus

Code Review | MinecraftServerStatus

WordPress plugin MinecraftServerStatus scored10%from 54 tests.

About plugin

  • Plugin page: minecraftserverst...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2015
  • Latest release: Jan 22, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: warewolfcz (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

80+ active /6,478 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/minecraftserverstatus/minecraft-server-status.php+42
    Methods with the same name as their class will not be constructors in a future version of PHP; MssWidget has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼50.38ms] Passed 4 tests

Server-side resources used by MinecraftServerStatus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.64 ▼34.71
Dashboard /wp-admin2.08 ▼1.226.20 ▼39.35
Posts /wp-admin/edit.php2.08 ▼1.277.46 ▼39.65
Add New Post /wp-admin/post-new.php2.08 ▼3.805.89 ▼87.81
Media Library /wp-admin/upload.php2.08 ▼1.145.17 ▼28.44

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 9 new options
New WordPress options
server-url
server-port
widget_recent-posts
widget_mss_widget
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for MinecraftServerStatus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.151.69 ▼0.0144.60 ▲4.38
Dashboard /wp-admin2,209 ▲235.86 ▲0.86105.44 ▼4.8441.57 ▼0.43
Posts /wp-admin/edit.php2,092 ▲62.01 ▼0.0241.15 ▲5.3434.30 ▲1.05
Add New Post /wp-admin/post-new.php1,514 ▼017.74 ▲0.37690.84 ▼9.6245.66 ▼11.24
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0994.46 ▼17.8141.81 ▼6.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/minecraftserverstatus/minecraft-server-status.php+42
    Methods with the same name as their class will not be constructors in a future version of PHP; MssWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • server-port
    • widget_mss_widget
    • server-url
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

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 everything seems fine, this is not an exhaustive test

SRP 0% 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 take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/minecraftserverstatus/core/test.php
    • > /wp-content/plugins/minecraftserverstatus/minecraft-server-status.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      fsockopen(): unable to connect to 77.93.202.250:25565 (Connection refused) in wp-content/plugins/minecraftserverstatus/core/MCServer.php on line 30
    • > PHP Fatal error
      require_once(): Failed opening required 'MCPacket.php' (include_path='.:/usr/share/php') in wp-content/plugins/minecraftserverstatus/core/test/TestMCPacketLong.php on line 5
    • > PHP Warning
      fsockopen(): unable to connect to 93.91.250.117:27246 (Connection timed out) in wp-content/plugins/minecraftserverstatus/core/MCServer.php on line 49
    • > PHP Fatal error
      require_once(): Failed opening required 'MCPacket.php' (include_path='.:/usr/share/php') in wp-content/plugins/minecraftserverstatus/core/test/TestMCPacketShort.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'MCPacket.php' (include_path='.:/usr/share/php') in wp-content/plugins/minecraftserverstatus/core/test/TestMCPacketVarInt.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'MCPacket.php' (include_path='.:/usr/share/php') in wp-content/plugins/minecraftserverstatus/core/test/TestMCPacketString.php on line 5
    • > PHP Warning
      require_once(MCPacket.php): failed to open stream: No such file or directory in wp-content/plugins/minecraftserverstatus/core/test/TestMCPacketShort.php on line 5
    • > PHP Warning
      require_once(MCPacket.php): failed to open stream: No such file or directory in wp-content/plugins/minecraftserverstatus/core/test/TestMCPacketVarInt.php on line 5
    • > PHP Warning
      require_once(MCPacket.php): failed to open stream: No such file or directory in wp-content/plugins/minecraftserverstatus/core/test/TestMCPacketString.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'MCException' not found in wp-content/plugins/minecraftserverstatus/core/exception/MCConnException.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: minecraft, widget, status

minecraftserverstatus/minecraft-server-status.php 92% from 13 tests

The entry point to "MinecraftServerStatus" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("minecraftserverstatus.php" instead of "minecraft-server-status.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
Success! There were no dangerous files found in this plugin787 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP18118205787

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods3792.50%
▷ Protected methods00.00%
▷ Private methods37.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin