10% football-leagues

Code Review | Football Leagues

WordPress plugin Football Leagues scored10%from 54 tests.

About plugin

  • Plugin page: football-leagues
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.7.1
  • WordPress version: 6.3.1
  • First release: Jan 21, 2014
  • Latest release: Feb 4, 2016
  • Number of updates: 3
  • Update frequency: every 248.0 days
  • Top authors: Jollyodds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,141 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/football-leagues/football-leagues.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; FootballLeagues has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼52.71ms] Passed 4 tests

Analyzing server-side resources used by Football Leagues
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.81 ▼36.56
Dashboard /wp-admin2.10 ▼1.205.12 ▼45.30
Posts /wp-admin/edit.php2.10 ▼1.255.31 ▼42.99
Add New Post /wp-admin/post-new.php2.10 ▼3.785.80 ▼85.97
Media Library /wp-admin/upload.php2.10 ▼1.124.80 ▼29.32

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_footballleagues
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Football Leagues
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.24 ▼0.351.97 ▲0.0440.34 ▼5.35
Dashboard /wp-admin2,198 ▲185.57 ▲0.0489.95 ▼6.7740.59 ▲0.97
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0438.90 ▲2.5834.93 ▼2.78
Add New Post /wp-admin/post-new.php1,526 ▼223.05 ▼0.18616.62 ▲1.1950.39 ▼3.00
Media Library /wp-admin/upload.php1,400 ▲34.13 ▼0.11111.80 ▲5.9044.73 ▲0.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/football-leagues/football-leagues.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; FootballLeagues has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_footballleagues
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/football-leagues/football-leagues.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === football-leagues === )
You can take inspiration from this readme.txt

football-leagues/football-leagues.php 92% from 13 tests

The principal PHP file in "Football Leagues" v. 1.01 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin273 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14115170
CSS112089
JavaScript10114

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.15
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bundesliga_league.png1.75KB1.85KB0.00%
images/primera_league.png2.80KB1.98KB▼ 29.23%
images/premier_league.png1.73KB1.42KB▼ 18.12%
images/Serie_A_league.png2.37KB1.94KB▼ 17.83%