83% soccer-info

Code Review | Soccer Info

WordPress plugin Soccer Info scored 83% from 54 tests.

About plugin

  • Plugin page: soccer-info
  • Plugin version: 1.9.8
  • PHP version: 7.4.16
  • WordPress compatibility: WordPress 3.3-4.7.2
  • WordPress version: 5.9.2
  • First release: Nov 26, 2012
  • Latest release: May 21, 2019
  • Number of updates: 82
  • Update frequency: every 28.9 days
  • Top authors: szi19830728 (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

1,000+ active / 41,446 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.27MB] [CPU: ▼280.80ms] 75% from 4 tests

Analyzing server-side resources used by Soccer Info
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 670.24ms on /wp-admin/options-general.php?page=soccer-info)
PageMemory (MB)CPU Time (ms)
Home /4.80 ▲1.2968.32 ▲17.16
Dashboard /wp-admin4.72 ▲1.3145.50 ▲10.69
Posts /wp-admin/edit.php4.94 ▲1.3053.81 ▲17.39
Add New Post /wp-admin/post-new.php8.21 ▲1.21119.97 ▼1,165.47
Media Library /wp-admin/upload.php4.59 ▲1.3038.94 ▲14.42
Soccer Info /wp-admin/options-general.php?page=soccer-info4.88670.24

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 163 new files
Database: no new tables, 2 new options
New WordPress options
soccer_info_options
widget_soccer_info_widget

Browser metrics Passed 4 tests

Checking browser requirements for Soccer Info
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲1916.01 ▼0.047.68 ▲0.672.71 ▼0.01
Dashboard /wp-admin2,897 ▲366.08 ▼0.02129.48 ▼8.44173.14 ▲13.14
Posts /wp-admin/edit.php2,697 ▲33.24 ▼0.1270.53 ▲8.06144.03 ▲1.96
Add New Post /wp-admin/post-new.php1,720 ▲5920.84 ▼1.93464.18 ▲39.25158.16 ▲1.00
Media Library /wp-admin/upload.php1,709 ▲115.47 ▼0.02141.82 ▼8.08188.29 ▼12.59
Soccer Info /wp-admin/options-general.php?page=soccer-info5,5902.7460.63178.99

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 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 2 options in the database
    • soccer_info_options
    • widget_soccer_info_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=soccer-info
    • > Notice in wp-content/plugins/soccer-info/soccer-info-admin.class.php+215
    Undefined property: stdClass::$downloaded

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Soccer Info Settings page), #2 (Shortcodes), #3 (Insert shortcodes without any hassels - Ranking table), #4 (Insert shortcodes without any hassels - Fixtures), #5 (Insert shortcodes without any hassels - Results), #6 (Widget), #7 (In action - 1), #8 (In action - 2)
The official readme.txt might help

soccer-info/soccer-info.php 92% from 13 tests

"Soccer Info" version 1.9.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "WordPress 3.3")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin12,662 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP94662,4908,156
PO File141,8662,6663,594
CSS210221519
JavaScript65122393

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity71.26
▷ Minimum class complexity1.00
▷ Maximum class complexity555.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods326
▷ Static methods8425.77%
▷ Public methods27484.05%
▷ Protected methods5015.34%
▷ Private methods20.61%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants975.00%
▷ Class constants325.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
107 PNG files occupy 1.85MB with 1.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/soccer-icons/tottenham_hotspur.png18.16KB0.73KB▼ 95.96%
img/soccer-icons/fc_kaiserslautern.png18.67KB1.24KB▼ 93.36%
img/soccer-icons/chemnitzer_fc.png15.60KB1.24KB▼ 92.07%
img/soccer-icons/borussia_dortmund.png18.83KB1.29KB▼ 93.18%
img/soccer-icons/dc_united.png18.52KB1.27KB▼ 93.13%