89% sportsmanager

Code Review | Sports Manager

WordPress plugin Sports Manager scored 89% from 54 tests.

About plugin

  • Plugin page: sportsmanager
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 5.8.1
  • First release: Apr 4, 2013
  • Latest release: Jul 19, 2013
  • Number of updates: 88
  • Update frequency: every 1.2 days
  • Top authors: lacroixca (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 6,336 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼145.46ms] Passed 4 tests

Analyzing server-side resources used by Sports Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0340.26 ▲4.89
Dashboard /wp-admin3.16 ▲0.1048.29 ▼6.20
Posts /wp-admin/edit.php3.21 ▲0.1051.03 ▲4.01
Add New Post /wp-admin/post-new.php5.45 ▲0.02100.24 ▼584.52
Media Library /wp-admin/upload.php3.04 ▲0.0439.45 ▲5.23

Server storage [IO: ▲0.70MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 114 new files
Database: 8 new tables, 1 new option
New tables
wp_sportsmanager_games
wp_sportsmanager_clubs
wp_sportsmanager_scoresheets
wp_sportsmanager_teams
wp_sportsmanager_locations
wp_sportsmanager_leagues
wp_sportsmanager_faq
wp_sportsmanager_players
New WordPress options
sportsmanager_disable_intro

Browser metrics Passed 4 tests

Sports Manager: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,725 ▲13016.34 ▲0.699.04 ▼1.3553.74 ▼7.37
Dashboard /wp-admin2,995 ▲615.90 ▼0.08142.20 ▼12.76121.88 ▼4.48
Posts /wp-admin/edit.php2,761 ▲222.84 ▲0.0073.08 ▲3.67106.52 ▲11.97
Add New Post /wp-admin/post-new.php1,701 ▲2918.52 ▼0.43390.54 ▲4.01120.89 ▼0.93
Media Library /wp-admin/upload.php1,829 ▲225.04 ▼0.00153.74 ▲3.65130.97 ▲1.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 26× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/sportsmanager/views/modal_edit_stats.php
    • > /wp-content/plugins/sportsmanager/views/modal_edit_cell.php
    • > /wp-content/plugins/sportsmanager/views/modal_edit_description.php
    • > /wp-content/plugins/sportsmanager/views/header.php
    • > /wp-content/plugins/sportsmanager/views/donate.php
    • > /wp-content/plugins/sportsmanager/views/import.php
    • > /wp-content/plugins/sportsmanager/views/modal_add_row.php
    • > /wp-content/plugins/sportsmanager/views/modal_edit_players_id.php
    • > /wp-content/plugins/sportsmanager/views/header_general.php
    • > /wp-content/plugins/sportsmanager/views/frontend_player_stats_box.php
  • 104× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/sportsmanager/functions/install.php:116
    • > PHP Fatal error
      Uncaught Error: Class 'SportsManager_Frontend_Default' not found in wp-content/plugins/sportsmanager/classes/Scoresheet.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sportsmanager/views/frontend_filters.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/sportsmanager/views/home.php on line 51
    • > PHP Notice
      Undefined variable: option_default_locations_url in wp-content/plugins/sportsmanager/views/home.php on line 82
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/sportsmanager/views/frontend_player_stats_box.php on line 18
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sportsmanager/controllers/frontend_player_stats_box.php:3
    • > PHP Notice
      Undefined variable: version in wp-content/plugins/sportsmanager/views/footer.php on line 5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/sportsmanager/languages/en.php:3
    • > PHP Notice
      Undefined variable: check_url in wp-content/plugins/sportsmanager/views/modal_intro.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: league managing system, stats, sports, league, sports managing system...

sportsmanager/sportsmanager.php Passed 13 tests

The main PHP script in "Sports Manager" version 1.3.1 is automatically included on every request by WordPress
36 characters long description:
Manage your sport league like a pro!

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
Good job! No executable or dangerous file extensions detected5,330 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP744252463,418
JavaScript767561,198
CSS31932714

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity21.80
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity7.12
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods51
▷ Static methods00.00%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.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
18 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrow_left.png1.14KB0.32KB▼ 71.89%
images/sports/football.png3.89KB1.36KB▼ 65.17%
images/icon_loupe.png1.21KB0.41KB▼ 66.29%
images/sort_asc_disabled.png0.23KB0.25KB0.00%
images/sort_desc_disabled.png0.24KB0.25KB0.00%