71% minecraft-control-panel

Code Review | Minecraft Control Panel

WordPress plugin Minecraft Control Panel scored71%from 54 tests.

About plugin

  • Plugin page: minecraft-control...
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 8, 2014
  • Latest release: Mar 17, 2014
  • Number of updates: 84
  • Update frequency: every 0.2 days
  • Top authors: Liath (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,052 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.22MB] [CPU: ▼12.36ms] Passed 4 tests

A check of server-side resources used by Minecraft Control Panel
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0834.82 ▼8.76
Dashboard /wp-admin3.42 ▲0.1148.08 ▲1.74
Posts /wp-admin/edit.php3.53 ▲0.1754.42 ▲10.38
Add New Post /wp-admin/post-new.php4.71 ▼1.1848.55 ▼49.59
Media Library /wp-admin/upload.php3.34 ▲0.1144.67 ▲7.18
Gruppen /wp-admin/admin.php?page=mcp_groups3.3339.32
Einstellungen /wp-admin/admin.php?page=mcp_settings3.3233.70
User /wp-admin/admin.php?page=mcp_user3.3137.84
Server /wp-admin/admin.php?page=mcp_server3.3432.20
Informationen /wp-admin/admin.php?page=mcp_mainpage3.3634.78

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 218 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Minecraft Control Panel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲19714.06 ▼0.3410.41 ▲8.3545.21 ▼0.69
Dashboard /wp-admin2,244 ▲534.94 ▲0.05111.29 ▼12.4689.20 ▲45.43
Posts /wp-admin/edit.php2,142 ▲502.09 ▲0.0944.05 ▲4.2437.81 ▲3.42
Add New Post /wp-admin/post-new.php1,714 ▲18122.42 ▼0.78732.88 ▲90.7833.46 ▼26.91
Media Library /wp-admin/upload.php1,441 ▲534.26 ▲0.04105.57 ▼20.1272.75 ▲21.70
Gruppen /wp-admin/admin.php?page=mcp_groups9411.7628.1029.32
Einstellungen /wp-admin/admin.php?page=mcp_settings1,0121.7929.6835.68
User /wp-admin/admin.php?page=mcp_user8221.7227.1727.29
Server /wp-admin/admin.php?page=mcp_server1,0901.7725.9527.97
Informationen /wp-admin/admin.php?page=mcp_mainpage9121.7527.6933.46

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mcp_server
    • > Notice in wp-content/plugins/minecraft-control-panel/templates/server.php+26
    Undefined index: action
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mcp_mainpage
    • > Notice in wp-content/plugins/minecraft-control-panel/templates/mainpage.php+22
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mcp_mainpage
    • > Warning in wp-content/plugins/minecraft-control-panel/templates/mainpage.php+22
    Invalid argument supplied for foreach()
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mcp_server
    • > Notice in wp-content/plugins/minecraft-control-panel/templates/server.php+188
    Undefined variable: location
    • > GET request to /wp-admin/admin.php?page=mcp_server
    • > Notice in wp-content/plugins/minecraft-control-panel/templates/server.php+131
    Undefined variable: consLines
    • > GET request to /wp-admin/admin.php?page=mcp_server
    • > Notice in wp-content/plugins/minecraft-control-panel/templates/server.php+143
    Undefined variable: chatLines
    • > GET request to /wp-admin/admin.php?page=mcp_mainpage
    • > Notice in wp-content/plugins/minecraft-control-panel/templates/mainpage.php+167
    Undefined variable: plugin_count
    • > GET request to /wp-admin/admin.php?page=mcp_mainpage
    • > Notice in wp-content/plugins/minecraft-control-panel/templates/mainpage.php+177
    Undefined variable: plugins

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
  • 14× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/minecraft-control-panel/0.6/0.5/templates/user.php
    • > /wp-content/plugins/minecraft-control-panel/0.7/0.6/0.5/templates/user.php
    • > /wp-content/plugins/minecraft-control-panel/0.7/0.6/templates/user.php
    • > /wp-content/plugins/minecraft-control-panel/0.7/0.5/templates/groups.php
    • > /wp-content/plugins/minecraft-control-panel/0.6/templates/user.php
    • > /wp-content/plugins/minecraft-control-panel/0.5/templates/groups.php
    • > /wp-content/plugins/minecraft-control-panel/0.6/0.5/templates/groups.php
    • > /wp-content/plugins/minecraft-control-panel/0.5/templates/user.php
    • > /wp-content/plugins/minecraft-control-panel/templates/groups.php
    • > /wp-content/plugins/minecraft-control-panel/0.7/0.6/0.5/templates/groups.php
  • 110× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/minecraft-control-panel/0.7/templates/groups.php on line 43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/minecraft-control-panel/0.7/0.6/minecraft-control.php:25
    • > PHP Fatal error
      Uncaught Error: Call to a member function call() on null in wp-content/plugins/minecraft-control-panel/0.7/0.6/0.5/templates/settings.php:18
    • > PHP Notice
      Undefined variable: groups in wp-content/plugins/minecraft-control-panel/0.6/templates/groups.php on line 67
    • > PHP Notice
      Undefined index: action in wp-content/plugins/minecraft-control-panel/0.6/templates/server.php on line 7
    • > PHP Notice
      Undefined index: action in wp-content/plugins/minecraft-control-panel/0.5/templates/settings.php on line 10
    • > PHP Notice
      Undefined index: action in wp-content/plugins/minecraft-control-panel/0.7/0.6/0.5/templates/server.php on line 16
    • > PHP Notice
      Undefined variable: groups in wp-content/plugins/minecraft-control-panel/templates/groups.php on line 43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/minecraft-control-panel/0.7/0.6/0.5/minecraft-control.php:18
    • > PHP Notice
      Undefined index: action in wp-content/plugins/minecraft-control-panel/0.5/templates/settings.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
  • Screenshots: These screenshots require images: #1 (Das Widget zeigt Informationen über Deinen Minecraftserver an. Vollständig konfigurierbar.), #2 (Das Menü erlaubt direkten Zugriff auf alle noch kommenden Funktionen.), #3 (Die Informationssseite zeigt die Grundeinstellungen und geladenen Plugins des Servers.), #4 (Die Serverseite bietet die Möglichkeit den Server zu starten/stoppen/resetten und verschafft eine Übersicht über die Konsole und den Chat. Dort kann man auch direkt Befehle oder Nachrichten ins Spiel senden.), #5 (Die Gruppenverwaltung erlaubt die vorhandenen Gruppen zu editieren oder neue zu erstellen.), #6 (Die Einstellungsseite gibt die Möglichkeit die API zu steuern und hält die wichtigsten Einstellungen des Plugins und der Widgets bereit.)
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

minecraft-control-panel/minecraft-control.php 92% from 13 tests

The primary PHP file in "Minecraft Control Panel" version 0.7 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("minecraft-control-panel.php" instead of "minecraft-control.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 detected5,381 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP275171683,094
JavaScript2123331,645
CSS489139642

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.07
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods308
▷ Static methods00.00%
▷ Public methods28492.21%
▷ Protected methods00.00%
▷ Private methods247.79%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
110 PNG files occupy 2.17MB with 0.92MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
0.7/0.6/0.5/images/dot_disabled.png2.72KB1.89KB▼ 30.46%
0.5/images/minecraft_logo.png1.71KB1.47KB▼ 13.78%
0.7/0.5/screenshot-1.png9.60KB4.70KB▼ 51.11%
0.7/screenshot-6.png40.79KB13.49KB▼ 66.94%
0.6/screenshot-1.png9.60KB4.70KB▼ 51.11%