84% ctl-battleship-minesweeper-lite

Code Review | CTL Battleship Minesweeper Lite

WordPress plugin CTL Battleship Minesweeper Lite scored84%from 54 tests.

About plugin

  • Plugin page: ctl-battleship-mi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.6
  • WordPress version: 6.3.1
  • First release: Sep 3, 2016
  • Latest release: Sep 19, 2016
  • Number of updates: 10
  • Update frequency: every 1.6 days
  • Top authors: codethislab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,328 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.34ms] Passed 4 tests

An overview of server-side resources used by CTL Battleship Minesweeper Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.33 ▼5.49
Dashboard /wp-admin3.36 ▲0.0647.73 ▲2.56
Posts /wp-admin/edit.php3.41 ▲0.0545.44 ▼5.37
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.57 ▼18.14
Media Library /wp-admin/upload.php3.28 ▲0.0537.21 ▼0.35
Premium Games /wp-admin/admin.php?page=ctl_arcade_lite_games3.2530.72
Install Battleship Minesweeper /wp-admin/admin.php?page=ctl_arcade_lite_game_ctl-battleship-minesweeper-lite3.2531.10
About Us /wp-admin/admin.php?page=ctl_arcade_lite_games_about_us3.2528.74

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

CTL Battleship Minesweeper Lite: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲6414.85 ▲0.591.81 ▼0.1043.61 ▼0.58
Dashboard /wp-admin2,241 ▲565.81 ▼0.0798.31 ▼9.4039.02 ▼6.32
Posts /wp-admin/edit.php2,124 ▲322.15 ▲0.1033.76 ▼6.6333.98 ▼1.68
Add New Post /wp-admin/post-new.php1,547 ▲2823.10 ▼0.64628.48 ▼43.5574.41 ▲16.81
Media Library /wp-admin/upload.php1,426 ▲354.23 ▲0.0393.72 ▼12.0040.38 ▼9.69
Premium Games /wp-admin/admin.php?page=ctl_arcade_lite_games8712.0337.9035.98
Install Battleship Minesweeper /wp-admin/admin.php?page=ctl_arcade_lite_game_ctl-battleship-minesweeper-lite8492.0323.6725.85
About Us /wp-admin/admin.php?page=ctl_arcade_lite_games_about_us2,43717.99426.95110.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=ctl_arcade_lite_games_about_us
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=ctl_arcade_lite_games_about_us
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/admin.php?page=ctl_arcade_lite_games_about_us
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yy/r/Qg-CynimBug.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=ctl_arcade_lite_games_about_us
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/yy/r/Qg-CynimBug.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

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 require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

ctl-battleship-minesweeper-lite/ctl-battleship-minesweeper-lite.php Passed 13 tests

The entry point to "CTL Battleship Minesweeper Lite" version 1.0 is a PHP file that has certain tags in its header comment area
65 characters long description:
Battleship Minesweeper Lite for CTL Arcade Lite Wordpress Plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin582 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP28720336
CSS29092
HTML214080
JavaScript301474

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
game/sprites/button_grid.png1.77KB1.80KB0.00%
game/sprites/toggle_flag.png2.30KB2.40KB0.00%
game/sprites/logo_ctl.png17.78KB7.83KB▼ 55.96%
game/sprites/bg_help.png7.37KB7.33KB▼ 0.56%
game/sprites/but_info.png4.04KB1.14KB▼ 71.82%