10% scoreboard-widget

Code Review | Plugin Name: Scoreboard Widget

WordPress plugin Plugin Name: Scoreboard Widgetscored10%from 54 tests.

About plugin

  • Plugin page: scoreboard-widget
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2018
  • Latest release: Apr 17, 2019
  • Number of updates: 7
  • Update frequency: every 42.1 days
  • Top authors: wrise (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,257 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/scoreboard-widget/widget-scoreboard.php+215
    Methods with the same name as their class will not be constructors in a future version of PHP; jc_scoreboard_widget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼55.29ms] Passed 4 tests

Analyzing server-side resources used by Plugin Name: Scoreboard Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.315.39 ▼40.83
Dashboard /wp-admin2.18 ▼1.136.15 ▼46.04
Posts /wp-admin/edit.php2.18 ▼1.187.27 ▼43.09
Add New Post /wp-admin/post-new.php2.18 ▼3.715.69 ▼88.97
Media Library /wp-admin/upload.php2.18 ▼1.055.93 ▼43.04
Score Categories /wp-admin/edit-tags.php?taxonomy=jc_scores_cat&post_type=jc_scoreboard2.186.62
All Scores /wp-admin/edit.php?post_type=jc_scoreboard2.186.47
Add New Score /wp-admin/post-new.php?post_type=jc_scoreboard2.186.61

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/scoreboard-widget/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_jc_scoreboard_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: Scoreboard Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲9413.13 ▼1.495.70 ▲3.6838.94 ▼3.60
Dashboard /wp-admin2,252 ▲495.83 ▼0.0497.34 ▼17.0339.51 ▼3.45
Posts /wp-admin/edit.php2,131 ▲311.98 ▼0.0241.94 ▲0.5536.66 ▲2.59
Add New Post /wp-admin/post-new.php1,575 ▲4923.04 ▲5.46647.90 ▲7.3650.34 ▼1.07
Media Library /wp-admin/upload.php1,431 ▲344.23 ▼0.02106.23 ▲2.9544.99 ▲2.87
Score Categories /wp-admin/edit-tags.php?taxonomy=jc_scores_cat&post_type=jc_scoreboard1,3022.1427.5429.66
All Scores /wp-admin/edit.php?post_type=jc_scoreboard1,1051.9730.3331.09
Add New Score /wp-admin/post-new.php?post_type=jc_scoreboard1,7352.6455.7958.80

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/scoreboard-widget/widget-scoreboard.php+215
    Methods with the same name as their class will not be constructors in a future version of PHP; jc_scoreboard_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_jc_scoreboard_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% 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
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=jc_scoreboard
    • > Deprecated in wp-content/plugins/scoreboard-widget/widget-scoreboard.php+215
    Methods with the same name as their class will not be constructors in a future version of PHP; jc_scoreboard_widget has a deprecated constructor
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=jc_scoreboard
    • > Notice in wp-content/plugins/scoreboard-widget/widget-scoreboard.php+144
    Undefined index: std

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: Scoreboard Widget=== )
You can take inspiration from this readme.txt

scoreboard-widget/widget-scoreboard.php 92% from 13 tests

The primary PHP file in "Plugin Name: Scoreboard Widget" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("scoreboard-widget.php" instead of "widget-scoreboard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin747 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript29251328
PHP14027251
CSS2220168

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin