78% disc-golf-manager

Code Review | Disc Golf Manager

WordPress plugin Disc Golf Manager scored78%from 54 tests.

About plugin

  • Plugin page: disc-golf-manager
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Apr 3, 2018
  • Latest release: Apr 7, 2018
  • Number of updates: 56
  • Update frequency: every 0.1 days
  • Top authors: GMRobbins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /929 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.86MB] [CPU: ▼3.64ms] Passed 4 tests

Server-side resources used by Disc Golf Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.37 ▲0.9043.39 ▲2.42
Dashboard /wp-admin4.20 ▲0.8556.20 ▼5.88
Posts /wp-admin/edit.php4.25 ▲0.8957.35 ▲4.07
Add New Post /wp-admin/post-new.php6.74 ▲0.8593.40 ▼13.54
Media Library /wp-admin/upload.php4.06 ▲0.8340.58 ▲2.45
Hidden /wp-admin/post-new.php?post_type=disc_golf_seasons4.1048.93
Hidden /wp-admin/post-new.php?post_type=disc_golf_leagues4.2558.10
Hidden /wp-admin/post-new.php?post_type=disc_golf_players4.1749.58
Hidden /wp-admin/post-new.php?post_type=disc_golf_scores4.2149.53
Scores /wp-admin/edit.php?post_type=disc_golf_scores4.1742.85
Hidden /wp-admin/post-new.php?post_type=disc_golf_events4.2353.17
Settings /wp-admin/admin.php?page=disc_golf_settings4.0539.02
Players /wp-admin/edit.php?post_type=disc_golf_players4.1640.39
Seasons /wp-admin/edit.php?post_type=disc_golf_seasons4.1640.97
Import /wp-admin/admin.php?page=disc_golf_import4.0437.57

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 44 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
disc_golf_migrations
widget_recent-comments
widget_theysaidso_widget
db_upgraded
disc_golf_notifications

Browser metrics Passed 4 tests

Disc Golf Manager: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲10614.31 ▼0.041.61 ▼0.6038.76 ▼4.80
Dashboard /wp-admin2,280 ▲1095.75 ▲0.1888.76 ▼14.6239.87 ▼2.15
Posts /wp-admin/edit.php2,188 ▲882.20 ▲0.0638.05 ▲0.5733.10 ▼4.62
Add New Post /wp-admin/post-new.php1,598 ▲7222.90 ▼0.71670.73 ▼13.3062.94 ▲6.81
Media Library /wp-admin/upload.php1,485 ▲824.49 ▲0.3598.08 ▼19.5742.62 ▼5.85
Hidden /wp-admin/post-new.php?post_type=disc_golf_seasons1,3122.5746.2154.69
Hidden /wp-admin/post-new.php?post_type=disc_golf_leagues1,9627.44159.8458.74
Hidden /wp-admin/post-new.php?post_type=disc_golf_players1,3372.5246.2243.14
Hidden /wp-admin/post-new.php?post_type=disc_golf_scores1,4302.7962.4231.05
Scores /wp-admin/edit.php?post_type=disc_golf_scores1,2602.1832.3230.18
Hidden /wp-admin/post-new.php?post_type=disc_golf_events1,7846.19119.7153.25
Settings /wp-admin/admin.php?page=disc_golf_settings9551.9125.8924.64
Players /wp-admin/edit.php?post_type=disc_golf_players1,1322.1432.5131.56
Seasons /wp-admin/edit.php?post_type=disc_golf_seasons1,1242.1433.8030.35
Import /wp-admin/admin.php?page=disc_golf_import9241.7724.5328.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_theysaidso_widget
    • disc_golf_notifications
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • disc_golf_migrations
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please take a closer look at the following
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/disc-golf-manager/views/meta_box_leagues_seasons.php
    • > /wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_event.php
    • > /wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_overview.php
    • > /wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_division.php
    • > /wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_player.php
    • > /wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_future_events.php
  • 48× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disc-golf-manager/main.php:3809
    • > PHP Notice
      Undefined variable: leagues in wp-content/plugins/disc-golf-manager/views/meta_box_events_details.php on line 3
    • > PHP Notice
      Undefined variable: event_base_url in wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_future_events.php on line 8
    • > PHP Notice
      Undefined variable: player_base_url in wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_player.php on line 10
    • > PHP Notice
      Undefined variable: divisions in wp-content/plugins/disc-golf-manager/views/meta_box_scores_details.php on line 8
    • > PHP Notice
      Undefined variable: action in wp-content/plugins/disc-golf-manager/views/admin.php on line 1
    • > PHP Notice
      Undefined variable: seasons in wp-content/plugins/disc-golf-manager/views/meta_box_leagues_seasons.php on line 3
    • > PHP Notice
      Undefined variable: event_base_url in wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_player.php on line 11
    • > PHP Notice
      Undefined variable: json_events in wp-content/plugins/disc-golf-manager/views/shortcode_disc_golf_player.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/disc-golf-manager/views/meta_box_players_details.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: tournament, disc, director, golf, manage...

disc-golf-manager/main.php 92% from 13 tests

This is the main PHP file of "Disc Golf Manager" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("disc-golf-manager.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin7,081 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP187534764,404
JavaScript12387251,454
CSS644501,223

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity282.50
▷ Minimum class complexity105.00
▷ Maximum class complexity460.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods130
▷ Static methods21.54%
▷ Public methods12696.92%
▷ Protected methods00.00%
▷ Private methods43.08%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.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
There were not PNG files found in your plugin