10% football-match-tracker

Code Review | Football Match Tracker

WordPress plugin Football Match Tracker scored 10% from 54 tests.

About plugin

  • Plugin page: football-match-tr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.5-5.8
  • WordPress version: 5.9.2
  • First release: Nov 8, 2016
  • Latest release: Jul 21, 2021
  • Number of updates: 12
  • Update frequency: every 142.8 days
  • Top authors: AddWeb Solution Pvt. Ltd. (83.33%)snehalb890 (25%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active / 7,217 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
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/football-match-tracker/includes/football-api-score-widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; ADDWEB_SCORE_BOARD_WIDGET has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼341.21ms] Passed 4 tests

An overview of server-side resources used by Football Match Tracker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.55 ▼1.006.06 ▼46.24
Dashboard /wp-admin2.57 ▼0.875.76 ▼28.06
Posts /wp-admin/edit.php2.57 ▼1.106.60 ▼31.97
Add New Post /wp-admin/post-new.php2.57 ▼4.445.59 ▼1,258.57
Media Library /wp-admin/upload.php2.57 ▼0.765.50 ▼19.21

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 5 new options
New WordPress options
widget_addweb_commentary_widget
match_page
competition_page
addweb_fa_api_authentication
widget_addweb_score_board_widget

Browser metrics Passed 4 tests

Checking browser requirements for Football Match Tracker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,001 ▲24716.64 ▲0.589.88 ▲2.972.43 ▼1.12
Dashboard /wp-admin2,965 ▲1077.07 ▲0.89120.95 ▼14.74170.47 ▲4.21
Posts /wp-admin/edit.php2,738 ▲473.32 ▲0.1070.46 ▲6.04164.33 ▲22.94
Add New Post /wp-admin/post-new.php1,849 ▲18824.21 ▲8.11405.85 ▼25.61191.14 ▲34.49
Media Library /wp-admin/upload.php1,777 ▲796.04 ▲0.48118.48 ▼35.17215.04 ▲17.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/football-match-tracker/includes/football-api-score-widget.php+18
    Methods with the same name as their class will not be constructors in a future version of PHP; ADDWEB_SCORE_BOARD_WIDGET has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 4 options in the database
    • competition_page
    • widget_addweb_commentary_widget
    • widget_addweb_score_board_widget
    • match_page

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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/football-match-tracker/includes/football-api-class.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

football-match-tracker/football-match-tracker.php 85% from 13 tests

The primary PHP file in "Football Match Tracker" version 1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 156 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin11,343 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
CSS689542,931
PHP71443302,497
Sass1434341,656
LESS1434441,646
SVG7461,517
JavaScript5161401,096

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 106)
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity52.60
▷ Minimum class complexity5.00
▷ Maximum class complexity157.00
Average method complexity11.75
▷ Minimum method complexity1.00
▷ Maximum method complexity106.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/addweb-logo.png11.75KB4.57KB▼ 61.12%