10% wp-club-manager

Code Review | WP Club Manager - WordPress Sports Club Plugin

WordPress plugin WP Club Manager - WordPress Sports Club Plugin scored10%from 54 tests.

About plugin

  • Plugin page: wp-club-manager
  • Plugin version: 2.2.10
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Mar 19, 2014
  • Latest release: Aug 11, 2023
  • Number of updates: 340
  • Update frequency: every 10.1 days
  • Top authors: ClubPress (49.71%)leonterry (49.12%)wpclubmanager (1.76%)

Code review

54 tests

User reviews

39 reviews

Install metrics

1,000+ active /113,534 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wp-club-manager/includes/class-wpcm-install.php+182
    Trying to get property 'soccer' of non-object

Server metrics [RAM: ▲2.19MB] [CPU: ▲1.92ms] Passed 4 tests

This is a short check of server-side resources used by WP Club Manager - WordPress Sports Club Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.88 ▲2.4261.57 ▲14.96
Dashboard /wp-admin6.41 ▲3.0671.20 ▲5.62
Posts /wp-admin/edit.php6.45 ▲3.1076.22 ▲26.78
Add New Post /wp-admin/post-new.php6.14 ▲0.2662.59 ▼39.70
Media Library /wp-admin/upload.php6.25 ▲3.0274.19 ▲38.18
Settings /wp-admin/admin.php?page=wpcm-settings6.5865.10
Venues /wp-admin/edit-tags.php?taxonomy=wpcm_venue&post_type=wpcm_club6.2562.37
Add New /wp-admin/post-new.php?post_type=wpcm_staff6.1461.40
Jobs /wp-admin/edit-tags.php?taxonomy=wpcm_jobs&post_type=wpcm_staff6.2567.93
Competitions /wp-admin/edit-tags.php?taxonomy=wpcm_comp&post_type=wpcm_club6.2561.70
Status /wp-admin/admin.php?page=wpcm-status6.3256.09
All Staff /wp-admin/edit.php?post_type=wpcm_staff6.3264.54
Dashboard /wp-admin/admin.php?page=wpcm-dashboard6.2954.74
Teams /wp-admin/edit-tags.php?taxonomy=wpcm_team&post_type=wpcm_player6.2562.16
All Matches /wp-admin/edit.php?post_type=wpcm_match6.3262.71

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 558 new files
Database: no new tables, 114 new options
New WordPress options
wpcm_standings_orderby
wpcm_staff_profile_show_nationality
wpcm_mode
wpcm_player_profile_show_age
wpcm_player_profile_show_joined
wpcm_player_profile_show_hometown
wpcm_match_show_stats_yellowcards
wpcm_match_show_stats_assists
wpcm_standings_orderby_3
widget_wpcm_players_widget
...

Browser metrics Passed 4 tests

WP Club Manager - WordPress Sports Club Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,244 ▲49813.66 ▼0.507.12 ▲5.2239.50 ▼5.23
Dashboard /wp-admin2,501 ▲3194.95 ▲0.05105.95 ▼0.3464.17 ▲20.83
Posts /wp-admin/edit.php2,353 ▲2642.19 ▲0.2036.87 ▼3.3840.01 ▲4.67
Add New Post /wp-admin/post-new.php1,734 ▲22021.76 ▲4.08730.36 ▲54.0863.47 ▲0.25
Media Library /wp-admin/upload.php1,649 ▲2584.14 ▼0.14109.24 ▲3.5887.47 ▲38.30
Settings /wp-admin/admin.php?page=wpcm-settings2,7622.3952.8843.56
Venues /wp-admin/edit-tags.php?taxonomy=wpcm_venue&post_type=wpcm_club2,2146.63158.31131.24
Add New /wp-admin/post-new.php?post_type=wpcm_staff3,9047.68202.08149.44
Jobs /wp-admin/edit-tags.php?taxonomy=wpcm_jobs&post_type=wpcm_staff1,5852.1230.9341.72
Competitions /wp-admin/edit-tags.php?taxonomy=wpcm_comp&post_type=wpcm_club1,5742.2533.6651.30
Status /wp-admin/admin.php?page=wpcm-status1,5842.1634.4242.34
All Staff /wp-admin/edit.php?post_type=wpcm_staff1,3772.3033.6434.43
Dashboard /wp-admin/admin.php?page=wpcm-dashboard1,3111.7626.2249.53
Teams /wp-admin/edit-tags.php?taxonomy=wpcm_team&post_type=wpcm_player1,5812.2632.6643.08
All Matches /wp-admin/edit.php?post_type=wpcm_match1,4252.3039.5136.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 16 options in the database
    • widget_wpcm_sponsors_widget
    • staff_single_image_size
    • player_thumbnail_image_size
    • widget_recent-posts
    • player_single_image_size
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wpcm_results
    • widget_wpcm_birthdays
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=wpcm_staff
    • > User notice in wp-includes/functions.php+5905
    Function WP_Object_Cache::delete was called incorrectly. Cache key must be an integer or a non-empty string, NULL given. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcm-dashboard
    • > Notice in wp-content/plugins/wp-club-manager/includes/admin/class-wpcm-admin-dashboard.php+60
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=wpcm-dashboard
    • > Notice in wp-content/plugins/wp-club-manager/includes/admin/class-wpcm-admin-dashboard.php+60
    Trying to get property 'slug' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpcm-dashboard
    • > Notice in wp-content/plugins/wp-club-manager/includes/admin/class-wpcm-admin-dashboard.php+282
    Trying to get property 'term_id' of non-object
    • > GET request to /wp-admin/admin.php?page=wpcm-dashboard
    • > Notice in wp-content/plugins/wp-club-manager/includes/admin/views/html-admin-page-dashboard.php+8
    Trying to get property 'name' of non-object

SRP 50% 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
Please fix the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-club-manager/includes/class-wpcm-taxonomy-order.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wp-club-manager/includes/libraries/tgm-plugin-activation/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-club-manager/includes/admin/views/html-admin-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-club-manager/assets/js/admin/editor-lang.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_post_thumbnail() in wp-content/plugins/wp-club-manager/includes/admin/views/html-admin-page-dashboard.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-club-manager/templates/layout/wrapper-end.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/wp-club-manager/includes/admin/views/html-admin-sidebar.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/edit-tags.php?taxonomy=wpcm_venue&post_type=wpcm_club
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?key&libraries=places&ver=6.3.1 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/edit-tags.php?taxonomy=wpcm_venue&post_type=wpcm_club
    • > Console-api (severe) in unknown
    http://maps.googleapis.com/maps/api/js?key&libraries=places&ver=6.3.1 153:248 "Geocoding Service: You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account"
    • > GET request to /wp-admin/edit-tags.php?taxonomy=wpcm_venue&post_type=wpcm_club
    • > Console-api (severe) in unknown
    http://maps.googleapis.com/maps/api/js?key&libraries=places&ver=6.3.1 153:248 "You are using this API without a key. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors"
    • > GET request to /wp-admin/post-new.php?post_type=wpcm_staff
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=wpcm_staff 2108:2 Uncaught TypeError: tinyMCE.addI18n(...) is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: fixtures, sport, club, team rosters, sports club...

wp-club-manager/wpclubmanager.php 92% from 13 tests

Analyzing the main PHP file in "WP Club Manager - WordPress Sports Club Plugin" version 2.2.10
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-club-manager.php" instead of "wpclubmanager.php")

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
No dangerous file extensions were detected140,010 lines of code in 252 files:
LanguageFilesBlank linesComment linesLines of code
PO File2739,39768,77986,817
PHP1785,4086,93923,551
CSS101,5241,95816,341
JavaScript361,0341,06113,290
SVG10011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity23.84
▷ Minimum class complexity1.00
▷ Maximum class complexity222.00
Average method complexity5.21
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes96
▷ Abstract classes11.04%
▷ Concrete classes9598.96%
▷ Final classes11.05%
Methods519
▷ Static methods12123.31%
▷ Public methods48192.68%
▷ Protected methods244.62%
▷ Private methods142.70%
Functions177
▷ Named functions17297.18%
▷ Anonymous functions52.82%
Constants13
▷ Global constants1076.92%
▷ Class constants323.08%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
265 compressed PNG files occupy 0.19MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/flags/ma.png0.42KB0.60KB0.00%
assets/images/flags/ct.png0.39KB0.64KB0.00%
assets/images/flags/lk.png0.61KB0.72KB0.00%
assets/js/leaflet/images/layers.png0.68KB1.05KB0.00%
assets/images/flags/hn.png0.52KB0.70KB0.00%