Benchmarks
Plugin footprint 23% 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
Please fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/golf-scores/golfScores.php+96
Methods with the same name as their class will not be constructors in a future version of PHP; golfScores has a deprecated constructor
Server metrics [RAM: ▼1.77MB] [CPU: ▼52.60ms] Passed 4 tests
An overview of server-side resources used by Golf Scores
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.21 ▼1.25 | 4.29 ▼36.47 |
Dashboard /wp-admin | 2.23 ▼1.07 | 6.30 ▼43.46 |
Posts /wp-admin/edit.php | 2.23 ▼1.12 | 6.69 ▼37.25 |
Add New Post /wp-admin/post-new.php | 2.23 ▼3.65 | 4.89 ▼93.22 |
Media Library /wp-admin/upload.php | 2.23 ▼1.00 | 6.86 ▼25.50 |
Enter Score /wp-admin/admin.php?page=scores_form | 2.23 | 5.08 |
Golf Scores /wp-admin/admin.php?page=golfscores | 2.23 | 6.62 |
Golf Scores /wp-admin/options-general.php?page=golfScores-plugin | 2.23 | 6.86 |
Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_golfScores |
New WordPress options |
---|
theysaidso_admin_options |
widget_golfscores |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
golfScores_database_version |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Golf Scores
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,049 ▲314 | 14.45 ▲0.06 | 15.09 ▲13.27 | 37.15 ▼9.63 |
Dashboard /wp-admin | 2,237 ▲49 | 5.90 ▲0.02 | 109.65 ▼5.74 | 43.23 ▼7.37 |
Posts /wp-admin/edit.php | 2,117 ▲28 | 2.01 ▼0.04 | 35.46 ▼0.67 | 32.15 ▼1.39 |
Add New Post /wp-admin/post-new.php | 1,539 ▲25 | 17.50 ▼0.18 | 681.87 ▼8.73 | 59.82 ▲18.50 |
Media Library /wp-admin/upload.php | 1,413 ▲28 | 4.22 ▲0.02 | 97.46 ▼11.10 | 41.16 ▼4.60 |
Enter Score /wp-admin/admin.php?page=scores_form | 1,029 | 1.94 | 31.38 | 38.03 |
Golf Scores /wp-admin/admin.php?page=golfscores | 1,120 | 2.06 | 22.95 | 29.04 |
Golf Scores /wp-admin/options-general.php?page=golfScores-plugin | 1,054 | 2.07 | 26.79 | 29.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/golf-scores/golfScores.php+96
Methods with the same name as their class will not be constructors in a future version of PHP; golfScores has a deprecated constructor
- The uninstall procedure failed, leaving 1 table in the database
- wp_golfScores
- This plugin does not fully uninstall, leaving 8 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- widget_golfscores
- golfScores_database_version
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=golfScores-plugin
- > Deprecated in wp-content/plugins/golf-scores/golfScores.php+96
Methods with the same name as their class will not be constructors in a future version of PHP; golfScores has a deprecated constructor
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=golfScores-plugin
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in golfScores is deprecated since version 4.3.0! Use __construct() instead.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+826
Undefined index: holes
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+828
Undefined index: gross_score
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+829
Undefined index: handicap
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+823
Undefined index: user_id
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+824
Undefined index: course
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+825
Undefined index: tee
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+827
Undefined index: golfScoresDate
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+830
Undefined variable: net_score
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+831
Undefined index: comments
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+832
Undefined index: id
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+836
Undefined index: nonce
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/functions.php+9
Trying to get property 'display_name' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=scores_form
- > Notice in wp-content/plugins/golf-scores/golfScores.php+990
Undefined variable: holes
- > GET request to /wp-admin/options-general.php?page=golfScores-plugin
- > Notice in wp-content/plugins/golf-scores/golfScores.php+194
Undefined index: golfScores_hidden
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=golfScores-plugin
- > User deprecated in wp-includes/functions.php+5737
Function WP_User->id was called with an argument that is deprecated since version 2.1.0! Use WP_User->ID instead.
SRP 0% 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 items
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/golf-scores/details.php
- > /wp-content/plugins/golf-scores/golfScores.php
- 11× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Notice
Undefined index: MyDate in wp-content/plugins/golf-scores/submitForm.php on line 4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/golf-scores/scoresAdmin.php on line 8
- > 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/golf-scores/scoresAdmin.php on line 8
- > PHP Notice
Undefined index: sid in wp-content/plugins/golf-scores/details.php on line 3
- > 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/golf-scores/scoresAdmin.php on line 8
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/golf-scores/editForm.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/golf-scores/functions.php:360
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/golf-scores/details.php on line 7
- > PHP Fatal error
Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/golf-scores/editForm.php:6
- > PHP Notice
Undefined index: score_id in wp-content/plugins/golf-scores/submitForm.php on line 3
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: golf score tracker, golf scores, golf
golf-scores/golfScores.php 85% from 13 tests
The main PHP file in "Golf Scores" ver. 1.1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Description: Please don't use more than 140 characters for the plugin description (currently 451 characters long)
- Main file name: Name the main plugin file the same as the plugin slug ("golf-scores.php" instead of "golfScores.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 plugin1,746 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 358 | 344 | 1,653 |
CSS | 1 | 12 | 1 | 87 |
JavaScript | 1 | 0 | 3 | 6 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 9.33 |
▷ Minimum class complexity | 8.00 |
▷ Maximum class complexity | 10.00 |
Average method complexity | 1.82 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 29 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 29 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 30 | |
▷ Named functions | 30 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
plugin-icon.png | 15.67KB | 0.61KB | ▼ 96.11% |
assets/images/golfscores.png | 15.67KB | 0.61KB | ▼ 96.11% |