83% league-of-legends-rotation

Code Review | WP LOL Rotation

WordPress plugin WP LOL Rotation scored83%from 54 tests.

About plugin

  • Plugin page: league-of-legends...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-4.0
  • WordPress version: 6.3.1
  • First release: Jul 5, 2014
  • Latest release: Oct 11, 2014
  • Number of updates: 6
  • Update frequency: every 16.7 days
  • Top authors: worstguy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,260 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.02MB] [CPU: ▼3.00ms] Passed 4 tests

A check of server-side resources used by WP LOL Rotation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.97 ▲2.44
Dashboard /wp-admin3.32 ▲0.0244.72 ▼1.74
Posts /wp-admin/edit.php3.37 ▲0.0245.82 ▼2.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.64 ▼10.32
Media Library /wp-admin/upload.php3.24 ▲0.0236.88 ▲5.41

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_wpb_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP LOL Rotation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.13 ▼1.221.72 ▼0.1137.50 ▼12.87
Dashboard /wp-admin2,206 ▲214.87 ▼1.03101.35 ▼8.6339.00 ▼5.00
Posts /wp-admin/edit.php2,086 ▼62.15 ▲0.1234.59 ▼6.1032.12 ▼4.74
Add New Post /wp-admin/post-new.php1,533 ▼223.34 ▼0.02666.46 ▼10.6162.32 ▲2.81
Media Library /wp-admin/upload.php1,382 ▼94.20 ▲0.0499.07 ▼2.5440.75 ▼1.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_wpb_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/league-of-legends-rotation/wp-lol-rotation.php:33

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === league-of-legends-rotation === )
  • Screenshots: Screenshot #1 (Demo on http://lolrotation.ovh/) image not found
The official readme.txt might help

league-of-legends-rotation/wp-lol-rotation.php 92% from 13 tests

Analyzing the main PHP file in "WP LOL Rotation" version 1.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("league-of-legends-rotation.php" instead of "wp-lol-rotation.php")

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
Success! There were no dangerous files found in this plugin63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1101263

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected