74% games-lol-download-box

Code Review | Games.lol Download Box

WordPress plugin Games.lol Download Box scored74%from 54 tests.

About plugin

  • Plugin page: games-lol-downloa...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2019
  • Latest release: Jan 31, 2019
  • Number of updates: 7
  • Update frequency: every 0.9 days
  • Top authors: gameslol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,414 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼4.02MB] [CPU: ▼383,532.93ms] Passed 4 tests

Server-side resources used by Games.lol Download Box
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.455.08 ▼42.02
Dashboard /wp-admin2.07 ▼9.466.16 ▼1,533,945.19
Posts /wp-admin/edit.php2.07 ▼1.327.70 ▼43.42
Add New Post /wp-admin/post-new.php2.07 ▼3.866.29 ▼101.08
Media Library /wp-admin/upload.php2.07 ▼1.205.81 ▼35.38

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Games.lol Download Box
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲14313.48 ▼0.769.74 ▲7.8442.17 ▼6.28
Dashboard /wp-admin2,205 ▲255.60 ▼0.0894.67 ▼8.2044.59 ▲1.66
Posts /wp-admin/edit.php2,107 ▲72.01 ▼0.0235.36 ▼2.1833.80 ▼2.55
Add New Post /wp-admin/post-new.php1,533 ▼223.29 ▲0.29633.35 ▼48.1348.39 ▼7.98
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.01109.04 ▼1.5441.81 ▼7.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the gldbox_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at 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 add_shortcode() in wp-content/plugins/games-lol-download-box/gldbox-shortcode.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: free games, download box, gameslol, shortcode, games

games-lol-download-box/gameslol-downloadbox.php 92% from 13 tests

This is the main PHP file of "Games.lol Download Box" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("games-lol-download-box.php" instead of "gameslol-downloadbox.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected308 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP34237131
CSS13611114
JavaScript1131163

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gameslol_icon.png4.81KB2.54KB▼ 47.09%
images/full-star.png4.47KB0.64KB▼ 85.74%
images/half-star.png4.52KB0.76KB▼ 83.10%
images/noshade-star.png4.53KB0.75KB▼ 83.50%