10% wordpress-football-leagues

Code Review | Wordpress Football Leagues

WordPress plugin Wordpress Football Leagues scored10%from 54 tests.

About plugin

  • Plugin page: wordpress-footbal...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 4, 2012
  • Latest release: May 6, 2015
  • Number of updates: 59
  • Update frequency: every 19.1 days
  • Top authors: ajthomascouk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,096 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wordpress-football-leagues/footleagues.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; wpfootballleagues has a deprecated constructor

Server metrics [RAM: ▼1.78MB] [CPU: ▼50.65ms] Passed 4 tests

A check of server-side resources used by Wordpress Football Leagues
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.83 ▼31.14
Dashboard /wp-admin2.23 ▼1.086.83 ▼43.99
Posts /wp-admin/edit.php2.23 ▼1.136.17 ▼37.04
Add New Post /wp-admin/post-new.php2.23 ▼3.666.61 ▼90.44
Media Library /wp-admin/upload.php2.23 ▼1.006.76 ▼25.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_wpfootballleagues
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress Football Leagues
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6414.81 ▲0.441.86 ▲0.1144.72 ▼0.30
Dashboard /wp-admin2,215 ▲244.91 ▲0.04101.12 ▼1.8839.92 ▼1.98
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0444.45 ▲8.9635.09 ▲3.17
Add New Post /wp-admin/post-new.php1,520 ▼1722.94 ▼0.23594.43 ▼56.7060.12 ▲5.12
Media Library /wp-admin/upload.php1,397 ▲94.40 ▲0.2194.74 ▼3.5141.08 ▼1.25

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
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wordpress-football-leagues/footleagues.php+36
    Methods with the same name as their class will not be constructors in a future version of PHP; wpfootballleagues has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_wpfootballleagues
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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 fix the following items
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wordpress-football-leagues/footleagues.php:27
    • > PHP Warning
      uasort() expects parameter 1 to be array, null given in wp-content/plugins/wordpress-football-leagues/getteams.php on line 61
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wordpress-football-leagues/getteams.php on line 63
    • > PHP Notice
      Undefined index: theteam in wp-content/plugins/wordpress-football-leagues/getteams.php on line 4
    • > PHP Notice
      Undefined index: league in wp-content/plugins/wordpress-football-leagues/getteams.php on line 2
    • > PHP Notice
      Undefined variable: get_league in wp-content/plugins/wordpress-football-leagues/getteams.php on line 51
    • > PHP Notice
      Undefined index: country in wp-content/plugins/wordpress-football-leagues/getteams.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Wordpress Football Leagues - Widget settings), #2 (Wordpress Football Leagues - Widget view - Shows Pld, Won, Goal Dif & Pts), #3 (Wordpress Football Leagues - Widget view - Limited to top 6 clubs. Shows Games won.)
You can look at the official readme.txt

wordpress-football-leagues/footleagues.php 85% from 13 tests

The primary PHP file in "Wordpress Football Leagues" version 0.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wordpress-football-leagues.php" instead of "footleagues.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 439 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin534 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24823448
JavaScript17057
CSS20029

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity18.00
▷ Minimum method complexity1.00
▷ Maximum method complexity41.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

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.14MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png20.65KB5.02KB▼ 75.71%
screenshot-1.png67.84KB15.01KB▼ 77.87%
screenshot-2.png57.17KB13.52KB▼ 76.36%