83% sports-club-management

Code Review | Sports Club Management

WordPress plugin Sports Club Management scored 83% from 54 tests.

About plugin

  • Plugin page: sports-club-manag...
  • Plugin version: 1.12.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2016
  • Latest release: Jan 3, 2023
  • Number of updates: 192
  • Update frequency: every 13.0 days
  • Top authors: pstruik (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active / 11,990 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▲2.07ms] Passed 4 tests

This is a short check of server-side resources used by Sports Club Management
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0851.97 ▲7.95
Dashboard /wp-admin3.36 ▲0.0551.65 ▼2.75
Posts /wp-admin/edit.php3.41 ▲0.0554.49 ▲1.39
Add New Post /wp-admin/post-new.php6.08 ▲0.19100.74 ▲10.18
Media Library /wp-admin/upload.php3.28 ▲0.0535.94 ▲1.69
Members /wp-admin/edit.php?post_type=scm_member3.3345.54
All Categories /wp-admin/admin.php?page=scm_all_categories_page3.2739.94
General Options /wp-admin/admin.php?page=scm_general_options_page3.3137.47
Export Data /wp-admin/admin.php?page=scm_export_data_page3.2936.07

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_scm_member_widget_birthdays
widget_theysaidso_widget
scm_version
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Sports Club Management
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲5113.27 ▼1.461.69 ▼0.1540.05 ▼5.11
Dashboard /wp-admin2,244 ▲384.88 ▲0.02120.76 ▲6.6441.02 ▼2.38
Posts /wp-admin/edit.php2,124 ▲351.99 ▼0.0335.90 ▲0.7335.20 ▲1.77
Add New Post /wp-admin/post-new.php1,562 ▲4322.97 ▼0.28658.17 ▲12.9056.69 ▼10.08
Media Library /wp-admin/upload.php1,423 ▲354.33 ▲0.11105.36 ▲7.9646.01 ▲1.21
Members /wp-admin/edit.php?post_type=scm_member1,1261.9331.4232.39
All Categories /wp-admin/admin.php?page=scm_all_categories_page8052.0327.8026.77
General Options /wp-admin/admin.php?page=scm_general_options_page9852.0727.6828.19
Export Data /wp-admin/admin.php?page=scm_export_data_page8162.0625.3025.68

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • scm_version
    • widget_recent-comments
    • widget_scm_member_widget_birthdays
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 31× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sports-club-management/code/matches.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sports-club-management/code/members_widgets.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sports-club-management/code/invoices_options_settings.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/sports-club-management/code/competitions_categories_page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sports-club-management/code/competitionformat_league.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/sports-club-management/code/competitions_export.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sports-club-management/code/competitors.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sports-club-management/code/compgroupformat_list.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sports-club-management/code/competitionformat_none.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sports-club-management/code/members.php:70

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #3 (After leage creation), #4 (After knockout creation), #5 (Member data on site), #6 (Competition information on site), #7 (Team information on site)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

sports-club-management/spclmgt.php 77% from 13 tests

The primary PHP file in "Sports Club Management" version 1.12.9 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sports-club-management.php" instead of "spclmgt.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Description: The description should be shorter than 140 characters (currently 173 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected6,856 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP349322565,249
JavaScript726915990
CSS25374617

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity15.00
▷ Minimum class complexity9.00
▷ Maximum class complexity21.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions190
▷ Named functions190100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
No PNG files were detected