57% joomsport-achievements

Code Review | JoomSport Achievements sport league

WordPress plugin JoomSport Achievements sport league scored57%from 54 tests.

About plugin

  • Plugin page: joomsport-achieve...
  • Plugin version: 1.5.2
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Jul 15, 2023
  • Number of updates: 21
  • Update frequency: every 105.4 days
  • Top authors: beardev (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /7,697 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.14MB] [CPU: ▲12.88ms] Passed 4 tests

A check of server-side resources used by JoomSport Achievements sport league
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.58 ▲1.1255.11 ▲13.79
Dashboard /wp-admin4.47 ▲1.1762.18 ▲13.11
Posts /wp-admin/edit.php4.51 ▲1.1570.00 ▲24.45
Add New Post /wp-admin/post-new.php7.05 ▲1.1695.96 ▲9.66
Media Library /wp-admin/upload.php4.37 ▲1.1451.62 ▲14.94
Players /wp-admin/edit.php?post_type=jsprt_achv_player4.4355.44
Stage Categories /wp-admin/admin.php?page=jsprtachv-page-gamestages4.3868.95
Leagues /wp-admin/edit-tags.php?taxonomy=jsprt_achv_league&post_type=jsprt_achv_season4.3965.36
Extra field New /wp-admin/options.php?page=jsprtachv-extrafields-form4.4165.98
Result Field New /wp-admin/options.php?page=jsprtachv-resfields-form4.4155.62
Extra fields /wp-admin/admin.php?page=jsprtachv-page-extrafields4.3854.74
Stage Category New /wp-admin/options.php?page=jsprtachv-gamestages-form4.4156.26
Result fields /wp-admin/admin.php?page=jsprtachv-page-resfields4.3850.50
Seasons /wp-admin/edit.php?post_type=jsprt_achv_season4.4355.46
Stages /wp-admin/edit.php?post_type=jsprt_achv_stage4.4357.26

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 327 new files
Database: 7 new tables, 6 new options
New tables
wp_jsprtachv_stages_val
wp_jsprtachv_stages
wp_jsprtachv_results_fields
wp_jsprtachv_country
wp_jsprtachv_extra_fields
wp_jsprtachv_extra_select
wp_jsprtachv_stage_result
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

JoomSport Achievements sport league: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,040 ▲29415.52 ▲1.122.00 ▲0.3741.80 ▼1.17
Dashboard /wp-admin2,422 ▲2347.03 ▲0.97129.60 ▲14.54109.91 ▲65.88
Posts /wp-admin/edit.php2,346 ▲2573.49 ▲1.4463.68 ▲24.88113.32 ▲72.85
Add New Post /wp-admin/post-new.php1,756 ▲22223.10 ▲1.90671.05 ▲36.8635.92 ▼21.90
Media Library /wp-admin/upload.php1,476 ▲884.58 ▲0.39100.82 ▼9.9086.71 ▲40.93
Players /wp-admin/edit.php?post_type=jsprt_achv_player1,3043.8065.1396.44
Stage Categories /wp-admin/admin.php?page=jsprtachv-page-gamestages1,3023.7254.4565.66
Leagues /wp-admin/edit-tags.php?taxonomy=jsprt_achv_league&post_type=jsprt_achv_season1,4853.7356.2180.87
Extra field New /wp-admin/options.php?page=jsprtachv-extrafields-form1,3013.6058.2681.10
Result Field New /wp-admin/options.php?page=jsprtachv-resfields-form1,3163.8653.14103.88
Extra fields /wp-admin/admin.php?page=jsprtachv-page-extrafields1,3303.5555.4986.96
Stage Category New /wp-admin/options.php?page=jsprtachv-gamestages-form1,2203.7262.0794.53
Result fields /wp-admin/admin.php?page=jsprtachv-page-resfields1,2463.6653.4126.21
Seasons /wp-admin/edit.php?post_type=jsprt_achv_season1,3013.7659.10107.30
Stages /wp-admin/edit.php?post_type=jsprt_achv_stage1,3013.8057.1798.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 tables in the database
    • wp_jsprtachv_stage_result
    • wp_jsprtachv_extra_fields
    • wp_jsprtachv_stages
    • wp_jsprtachv_results_fields
    • wp_jsprtachv_country
    • wp_jsprtachv_extra_select
    • wp_jsprtachv_stages_val
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=jsprt_achv_stage
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=jsprt_achv_stage
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 76 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=jsprt_achv_stage
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=jsprt_achv_stage
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/joomsport-achievements/joomsport-achievements.php
  • 25× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/joomsport-achievements/includes/pages/joomsport-achievments-page-extrafields.php on line 8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/joomsport-achievements/includes/pages/joomsport-achievments-page-resultfields.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'JOOMSPORT_ACHIEVEMENTS_PATH_INCLUDESmeta-boxes/joomsport-achievments-meta-player.php' (include_path='.:/usr/share/php') in wp-content/plugins/joomsport-achievements/includes/posts/joomsport-achievments-post-player.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/joomsport-achievements/includes/joomsport-achievments-templates.php:12
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/joomsport-achievements/includes/pages/joomsport-achievments-page-stages.php on line 8
    • > PHP Warning
      require_once(JOOMSPORT_ACHIEVEMENTS_PATH_INCLUDESmeta-boxes/joomsport-achievments-meta-season.php): failed to open stream: No such file or directory in wp-content/plugins/joomsport-achievements/includes/posts/joomsport-achievments-post-season.php on line 8
    • > PHP Warning
      Use of undefined constant JOOMSPORT_ACHV_PATH_CLASSES - assumed 'JOOMSPORT_ACHV_PATH_CLASSES' (this will throw an Error in a future version of PHP) in wp-content/plugins/joomsport-achievements/sportleague/base/wordpress/classes/class-jsport-database-base.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'JOOMSPORT_ACHIEVEMENTS_PATH_INCLUDESmeta-boxes/joomsport-achievments-meta-stage.php' (include_path='.:/usr/share/php') in wp-content/plugins/joomsport-achievements/includes/posts/joomsport-achievments-post-stage.php on line 7
    • > PHP Warning
      Use of undefined constant JOOMSPORT_ACHIEVEMENTS_PATH_INCLUDES - assumed 'JOOMSPORT_ACHIEVEMENTS_PATH_INCLUDES' (this will throw an Error in a future version of PHP) in wp-content/plugins/joomsport-achievements/includes/posts/joomsport-achievments-post-player.php on line 8
    • > PHP Warning
      require_once(JOOMSPORT_ACHV_PATH_CLASSESclass-jsport-database.php): failed to open stream: No such file or directory in wp-content/plugins/joomsport-achievements/sportleague/base/wordpress/classes/class-jsport-database-base.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=jsprtachv-page-resfields
    • > Network (severe)
    https://useresponse.com/404 - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: sport league, athletics, racing, olympic games, sports...

joomsport-achievements/joomsport-achievements.php 92% from 13 tests

The primary PHP file in "JoomSport Achievements sport league" version 1.5.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "4.0")

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
Everything looks great! No dangerous files found in this plugin13,433 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
CSS532227,439
PHP481,0094745,163
JavaScript7151101787
Markdown112026
PO File10014
HTML1004

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.67
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes45
▷ Abstract classes12.22%
▷ Concrete classes4497.78%
▷ Final classes00.00%
Methods261
▷ Static methods13049.81%
▷ Public methods23790.80%
▷ Protected methods00.00%
▷ Private methods249.20%
Functions17
▷ Named functions1164.71%
▷ Anonymous functions635.29%
Constants27
▷ Global constants2592.59%
▷ Class constants27.41%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
260 compressed PNG files occupy 0.19MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/flags/ch.png0.57KB0.49KB▼ 13.57%
assets/images/flags/mv.png0.74KB0.84KB0.00%
assets/images/flags/la.png0.63KB0.67KB0.00%
sportleague/assets/images/calendar_ico_hover.png1.35KB0.53KB▼ 60.62%
assets/images/flags/bt.png0.91KB0.96KB0.00%