10% lol-free-champion-rotation

Code Review | LoL Free Champion Rotation

WordPress plugin LoL Free Champion Rotation scored10%from 54 tests.

About plugin

  • Plugin page: lol-free-champion...
  • Plugin version: 4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1
  • WordPress version: 6.3.1
  • First release: May 21, 2016
  • Latest release: Nov 2, 2022
  • Number of updates: 35
  • Update frequency: every 67.3 days
  • Top authors: alurosu (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,324 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/lol-free-champion-rotation/index.php+96
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼55.99ms] Passed 4 tests

Server-side resources used by LoL Free Champion Rotation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.22 ▼36.22
Dashboard /wp-admin2.05 ▼1.307.83 ▼60.07
Posts /wp-admin/edit.php2.05 ▼1.315.50 ▼33.20
Add New Post /wp-admin/post-new.php2.05 ▼3.845.59 ▼94.46
Media Library /wp-admin/upload.php2.05 ▼1.185.54 ▼29.06

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

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

Browser metrics Passed 4 tests

LoL Free Champion Rotation: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲13913.58 ▼0.7910.15 ▲8.3338.42 ▼6.86
Dashboard /wp-admin2,206 ▲184.86 ▼0.01108.63 ▼3.7440.41 ▼0.37
Posts /wp-admin/edit.php2,086 ▼62.03 ▼0.0333.54 ▼10.6137.31 ▲0.04
Add New Post /wp-admin/post-new.php1,538 ▲2123.13 ▲5.61690.26 ▲73.5762.06 ▲2.53
Media Library /wp-admin/upload.php1,388 ▲94.22 ▲0.0693.45 ▼7.6043.25 ▲1.99

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
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/lol-free-champion-rotation/index.php+96
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_lol_free_champion_rotation
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lol-free-champion-rotation/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

lol-free-champion-rotation/index.php 92% from 13 tests

The main file in "LoL Free Champion Rotation" v. 4.0 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:
  • Main file name: Name the main plugin file the same as the plugin slug ("lol-free-champion-rotation.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected131 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11122103
CSS10018
JavaScript10310

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.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%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin