10% mcstatus

Code Review | MCstatus

WordPress plugin MCstatus scored 10% from 54 tests.

About plugin

  • Plugin page: mcstatus
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0.0
  • WordPress version: 5.8.1
  • First release: Sep 15, 2014
  • Latest release: Sep 15, 2014
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: tim4dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 4,203 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
  • Install procedure had errors
    • > Warning in wp-content/plugins/mcstatus/widget.php+45
    Declaration of MCstatus_Widget::widget(array $args, array $instance) should be compatible with WP_Widget::widget($args, $instance)

Server metrics [RAM: ▼1.82MB] [CPU: ▼194.23ms] Passed 4 tests

A check of server-side resources used by MCstatus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼0.917.57 ▼17.81
Dashboard /wp-admin1.83 ▼1.235.54 ▼50.44
Posts /wp-admin/edit.php1.83 ▼1.285.83 ▼43.37
Add New Post /wp-admin/post-new.php1.83 ▼3.607.67 ▼648.85
Media Library /wp-admin/upload.php1.83 ▼1.185.42 ▼34.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
widget_mcstatus

Browser metrics Passed 4 tests

MCstatus: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.84 ▲0.1710.16 ▲0.1154.89 ▲2.71
Dashboard /wp-admin2,967 ▲365.96 ▼0.10158.43 ▼3.78115.36 ▼8.18
Posts /wp-admin/edit.php2,739 ▼02.71 ▲0.0074.62 ▼1.8099.60 ▲1.48
Add New Post /wp-admin/post-new.php1,615 ▲3421.50 ▲5.18329.97 ▼136.45107.36 ▼24.93
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.01174.16 ▲2.13127.83 ▲1.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/mcstatus/widget.php+45
    Declaration of MCstatus_Widget::widget(array $args, array $instance) should be compatible with WP_Widget::widget($args, $instance)
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_mcstatus

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mcstatus/libs/Widgetize.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/mcstatus/libs/Widgetize.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === mcstatus === )
You can look at the official readme.txt

mcstatus/widget.php 92% from 13 tests

The entry point to "MCstatus" version 0.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("mcstatus.php" instead of "widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected560 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP88767460
PO File1222859
Markdown122041

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.20
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1275.00%
▷ Protected methods16.25%
▷ Private methods318.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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