62% the-soccer-stats

Code Review | The Soccer Stats

WordPress plugin The Soccer Stats scored62%from 54 tests.

About plugin

  • Plugin page: the-soccer-stats
  • Plugin version: 1.08
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: May 5, 2016
  • Latest release: Nov 25, 2016
  • Number of updates: 19
  • Update frequency: every 10.7 days
  • Top authors: lepileppanen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,819 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.69MB] [CPU: ▼1.91ms] Passed 4 tests

Analyzing server-side resources used by The Soccer Stats
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7148.07 ▲5.21
Dashboard /wp-admin4.04 ▲0.6951.73 ▼11.22
Posts /wp-admin/edit.php4.11 ▲0.7552.06 ▲0.28
Add New Post /wp-admin/post-new.php6.58 ▲0.69102.06 ▼1.90
Media Library /wp-admin/upload.php3.90 ▲0.6742.55 ▲8.12
All Match Types /wp-admin/edit.php?post_type=tss-matchtypes3.9741.62
All Players /wp-admin/edit.php?post_type=tss-players3.9640.04
Settings /wp-admin/admin.php?page=tss_settings_page3.8745.15
All Matches /wp-admin/edit.php?post_type=tss-matches3.9641.29
All Seasons /wp-admin/edit.php?post_type=tss-seasons3.9640.64
All Opponents /wp-admin/edit.php?post_type=tss-opponents3.9742.09

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 50 new files
Database: 7 new tables, 6 new options
New tables
tss_substitutions
tss_starters
tss_redcards
tss_goals
tss_yellowcards
tss_substitutes
tss_player_seasons
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for The Soccer Stats
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲22614.04 ▼0.3112.88 ▲11.2543.36 ▲2.73
Dashboard /wp-admin2,265 ▲884.90 ▼0.7189.60 ▼2.0638.93 ▼3.18
Posts /wp-admin/edit.php2,170 ▲882.28 ▲0.2736.23 ▼0.5834.54 ▼2.03
Add New Post /wp-admin/post-new.php1,588 ▲6223.82 ▲0.96617.50 ▼23.6755.30 ▼1.94
Media Library /wp-admin/upload.php1,470 ▲734.34 ▲0.11102.76 ▲2.3040.83 ▼8.54
All Match Types /wp-admin/edit.php?post_type=tss-matchtypes1,1402.4231.8528.90
All Players /wp-admin/edit.php?post_type=tss-players1,1432.4136.7528.60
Settings /wp-admin/admin.php?page=tss_settings_page9851.9833.6131.07
All Matches /wp-admin/edit.php?post_type=tss-matches1,1432.4135.0227.89
All Seasons /wp-admin/edit.php?post_type=tss-seasons1,1432.4134.0727.19
All Opponents /wp-admin/edit.php?post_type=tss-opponents1,1402.4233.1028.79

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 7 tables in the database
    • tss_substitutions
    • tss_yellowcards
    • tss_redcards
    • tss_goals
    • tss_player_seasons
    • tss_substitutes
    • tss_starters
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% 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)
Good news, no errors were detected

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/the-soccer-stats/the-soccer-stats.php
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/the-soccer-stats/templates/single-tss-players.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-soccer-stats/ajax/ajax-admin.php:57
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/the-soccer-stats/templates/single-tss-matches.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-soccer-stats/meta-boxes/players.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/the-soccer-stats/templates/single-tss-opponents.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-soccer-stats/settings/settings.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/the-soccer-stats/templates/single-tss-seasons.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-soccer-stats/meta-boxes/players.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-soccer-stats/post-types/post-types.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/the-soccer-stats/meta-boxes/matches.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=tss-opponents
    • > Javascript (severe) in unknown
    /wp-content/plugins/the-soccer-stats/plugins/bootstrap/bootstrap.min.js?ver=6.3.1 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt might help

the-soccer-stats/the-soccer-stats.php Passed 13 tests

This is the main PHP file of "The Soccer Stats" version 1.08, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
46 characters long description:
Ultimate soccer statistics tool for your team.

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
Good job! No executable or dangerous file extensions detected13,898 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
CSS66218,964
PHP266457473,275
PO File2369448768
SVG100655
JavaScript6539236

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.40
▷ Minimum class complexity2.00
▷ Maximum class complexity41.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1062.50%
▷ Protected methods00.00%
▷ Private methods637.50%
Functions75
▷ Named functions75100.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
There are no PNG files in this plugin