10% league-of-legends-shortcodes

Code Review | League of Legends Shortcodes

WordPress plugin League of Legends Shortcodes scored10%from 54 tests.

About plugin

  • Plugin page: league-of-legends...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2013
  • Latest release: Jun 19, 2014
  • Number of updates: 18
  • Update frequency: every 11.4 days
  • Top authors: TEZZERACT (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,679 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/league-of-legends-shortcodes/lol-shortcodes.php+35
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.84MB] [CPU: ▼51.16ms] Passed 4 tests

A check of server-side resources used by League of Legends Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.315.43 ▼36.84
Dashboard /wp-admin2.17 ▼1.146.69 ▼42.14
Posts /wp-admin/edit.php2.17 ▼1.196.60 ▼41.65
Add New Post /wp-admin/post-new.php2.17 ▼3.726.91 ▼83.99
Media Library /wp-admin/upload.php2.17 ▼1.065.64 ▼30.67
LoL Shortcodes /wp-admin/options-general.php?page=lolsc2.177.54

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: 1 new table, 6 new options
New tables
wp_lolshortcodes
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by League of Legends Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.48 ▼0.171.69 ▼0.0143.75 ▲0.63
Dashboard /wp-admin2,210 ▲214.86 ▼0.10112.37 ▼6.4843.02 ▼1.92
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0136.14 ▲1.1633.53 ▼2.27
Add New Post /wp-admin/post-new.php1,536 ▼123.12 ▲0.04646.71 ▲8.9665.08 ▲12.55
Media Library /wp-admin/upload.php1,392 ▲14.29 ▲0.0794.92 ▼2.3443.56 ▲0.14
LoL Shortcodes /wp-admin/options-general.php?page=lolsc7742.0224.2525.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/league-of-legends-shortcodes/lol-shortcodes.php+35
    Trying to access array offset on value of type bool
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_lolshortcodes
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lolsc
    • > Notice in wp-content/plugins/league-of-legends-shortcodes/lol-shortcodes.php+271
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/league-of-legends-shortcodes/lol-shortcodes.php:34

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)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need your attention: You can take inspiration from this readme.txt

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

The main PHP file in "League of Legends Shortcodes" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("league-of-legends-shortcodes.php" instead of "lol-shortcodes.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
Good job! No executable or dangerous file extensions detected180 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13370180

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
42 PNG files occupy 1.22MB with 0.76MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/spells/20.png8.60KB3.68KB▼ 57.17%
images/ranks/GOLD_II.png39.91KB12.04KB▼ 69.82%
images/spells/10.png9.50KB3.89KB▼ 59.08%
images/spells/3.png8.97KB3.77KB▼ 58.01%
images/ranks/BRONZE_III.png39.49KB12.18KB▼ 69.17%