10% minecraft-onlineusers-widget

Code Review | Minecraft Online Players Widget

WordPress plugin Minecraft Online Players Widget scored10%from 54 tests.

About plugin

  • Plugin page: minecraft-onlineu...
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Jul 4, 2012
  • Latest release: Dec 24, 2015
  • Number of updates: 15
  • Update frequency: every 84.5 days
  • Top authors: pirmax (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

50+ active /16,101 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/minecraft-onlineusers-widget/widget.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_mou has a deprecated constructor

Server metrics [RAM: ▼1.87MB] [CPU: ▼56.34ms] Passed 4 tests

An overview of server-side resources used by Minecraft Online Players Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.344.85 ▼41.46
Dashboard /wp-admin2.14 ▼1.166.63 ▼42.63
Posts /wp-admin/edit.php2.14 ▼1.227.48 ▼45.02
Add New Post /wp-admin/post-new.php2.14 ▼3.755.51 ▼96.26
Media Library /wp-admin/upload.php2.14 ▼1.096.38 ▼32.04

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_widget-mou
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Minecraft Online Players Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲5413.33 ▼1.032.35 ▲0.0355.12 ▲10.41
Dashboard /wp-admin2,218 ▲155.86 ▼0.04104.76 ▼4.4939.88 ▲0.38
Posts /wp-admin/edit.php2,097 ▲182.01 ▼0.0438.76 ▼3.9643.19 ▲11.37
Add New Post /wp-admin/post-new.php1,541 ▼323.00 ▲0.41623.85 ▲9.3578.08 ▲10.62
Media Library /wp-admin/upload.php1,403 ▲64.25 ▼0.03111.33 ▼1.5746.76 ▼4.45

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/minecraft-onlineusers-widget/widget.class.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; widget_mou has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_widget-mou

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/minecraft-onlineusers-widget/plugin_action_links.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minecraft-onlineusers-widget/widgets_init.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/minecraft-onlineusers-widget/plugin_row_meta.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minecraft-onlineusers-widget/widgets_init.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_widget' not found in wp-content/plugins/minecraft-onlineusers-widget/widget.class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Un exemple d'affichage de plusieurs joueurs en ligne), #2 (Un autre exemple d'affichage de deux joueurs en ligne)
  • Plugin Name: Please specify the plugin name on the first line ( === minecraft-onlineusers-widget === )
  • Tags: You are using too many tags: 22 tag instead of maximum 10
You can look at the official readme.txt

minecraft-onlineusers-widget/widget.php 92% from 13 tests

"Minecraft Online Players Widget" version 3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("minecraft-onlineusers-widget.php" instead of "widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin326 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP67927326

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.85KB10.40KB▼ 38.29%
screenshot-2.png4.69KB3.43KB▼ 26.92%