84% lm-gd-scoreboard

Code Review | LeagueManager GameDay Scoreboard widget

WordPress plugin LeagueManager GameDay Scoreboard widget scored84%from 54 tests.

About plugin

  • Plugin page: lm-gd-scoreboard
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2016
  • Latest release: Feb 17, 2016
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: barshai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,596 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.04ms] Passed 4 tests

A check of server-side resources used by LeagueManager GameDay Scoreboard widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.70 ▼4.77
Dashboard /wp-admin3.31 ▲0.0044.25 ▼3.88
Posts /wp-admin/edit.php3.36 ▲0.0044.36 ▼9.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.59 ▼10.27
Media Library /wp-admin/upload.php3.23 ▲0.0033.94 ▼0.33

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_lm_gd_scoreboard_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for LeagueManager GameDay Scoreboard widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.181.74 ▼0.1540.55 ▼2.91
Dashboard /wp-admin2,206 ▲154.86 ▼1.03108.08 ▲6.5437.75 ▼4.00
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0540.15 ▼1.1235.02 ▲0.21
Add New Post /wp-admin/post-new.php1,542 ▲2318.73 ▼4.55612.67 ▼13.4954.81 ▲3.49
Media Library /wp-admin/upload.php1,388 ▼34.34 ▲0.1997.36 ▼2.7046.17 ▼1.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_lm_gd_scoreboard_widget
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lm-gd-scoreboard/class-lm-gd-scoreboard-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/lm-gd-scoreboard/lm-gd-scoreboard.php:139

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed: You can take inspiration from this readme.txt

lm-gd-scoreboard/lm-gd-scoreboard.php Passed 13 tests

The entry point to "LeagueManager GameDay Scoreboard widget" version 1.0.1 is a PHP file that has certain tags in its header comment area
49 characters long description:
LeagueManager scoreboard widget for GameDay theme

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
No dangerous file extensions were detected285 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25975234
PO File1143351

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.18
Average class complexity10.00
▷ Minimum class complexity7.00
▷ Maximum class complexity13.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods642.86%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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