68% scoreboard-for-html5-game-lite

Code Review | Scoreboard for HTML5 Games Lite

WordPress plugin Scoreboard for HTML5 Games Lite scored 68% from 54 tests.

About plugin

  • Plugin page: scoreboard-for-ht...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 11, 2022
  • Latest release: Aug 16, 2023
  • Number of updates: 18
  • Update frequency: every 29.1 days
  • Top authors: demonisblack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,793 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.95ms] Passed 4 tests

This is a short check of server-side resources used by Scoreboard for HTML5 Games Lite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.96 ▼9.60
Dashboard /wp-admin3.39 ▲0.0948.90 ▲3.32
Posts /wp-admin/edit.php3.51 ▲0.1550.07 ▼4.31
Add New Post /wp-admin/post-new.php5.99 ▲0.1096.77 ▲2.81
Media Library /wp-admin/upload.php3.31 ▲0.0839.54 ▲6.60
Filters /wp-admin/admin.php?page=sfhg_filters3.3236.46
Quick Start /wp-admin/admin.php?page=sfhg_quickstart3.4137.14
Games /wp-admin/admin.php?page=sfhg_games3.4230.82
Scoreboard /wp-admin/admin.php?page=sfhg_scoreboard3.3234.81

Server storage [IO: ▲0.74MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: 3 new tables, 7 new options
New tables
wp_sfhg_filter_scores
wp_sfhg_settings
wp_sfhg_filter_users
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
sfhg_scoreboard_settings
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Scoreboard for HTML5 Games Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲13513.59 ▼0.811.64 ▼0.2438.79 ▼10.48
Dashboard /wp-admin2,274 ▲835.30 ▲0.40113.36 ▲8.5041.79 ▼1.91
Posts /wp-admin/edit.php2,161 ▲692.43 ▲0.3941.63 ▲3.6934.94 ▲0.39
Add New Post /wp-admin/post-new.php1,575 ▲4223.31 ▲0.12662.37 ▼3.5736.18 ▼14.70
Media Library /wp-admin/upload.php1,456 ▲684.58 ▲0.2698.64 ▼21.1543.14 ▼11.60
Filters /wp-admin/admin.php?page=sfhg_filters8932.2528.4630.38
Quick Start /wp-admin/admin.php?page=sfhg_quickstart1,5432.2628.9955.29
Games /wp-admin/admin.php?page=sfhg_games9132.3428.5028.89
Scoreboard /wp-admin/admin.php?page=sfhg_scoreboard8962.2633.6930.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_sfhg_settings
    • wp_sfhg_filter_scores
    • wp_sfhg_filter_users
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • sfhg_scoreboard_settings
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=sfhg_games
    • > Notice in wp-content/plugins/scoreboard-for-html5-game-lite/includes/game.php+321
    Undefined variable: action_url

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/scoreboard-for-html5-game-lite/includes/form-game.php:2

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

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

scoreboard-for-html5-game-lite/scoreboard-for-html5-game-lite.php 92% from 13 tests

The main file in "Scoreboard for HTML5 Games Lite" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 308 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,135 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7120951,029
JavaScript35664
CSS26042

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
There were not PNG files found in your plugin