Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼147.10ms] Passed 4 tests
An overview of server-side resources used by Help a Charity
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 35.54 ▲2.61 |
Dashboard /wp-admin | 3.06 ▲0.01 | 33.55 ▼11.97 |
Posts /wp-admin/edit.php | 3.11 ▲0.01 | 38.39 ▼7.12 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.01 | 87.51 ▼567.79 |
Media Library /wp-admin/upload.php | 3.00 ▲0.00 | 33.08 ▼1.52 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by Help a Charity
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,679 ▲83 | 15.95 ▲0.06 | 9.05 ▲0.73 | 48.95 ▲1.66 |
Dashboard /wp-admin | 2,970 ▲36 | 6.00 ▲0.07 | 129.99 ▼8.99 | 109.33 ▲2.58 |
Posts /wp-admin/edit.php | 2,736 ▼3 | 2.69 ▼0.01 | 63.89 ▼6.00 | 91.41 ▲2.26 |
Add New Post /wp-admin/post-new.php | 1,672 ▲172 | 19.02 ▲0.12 | 372.07 ▼3.12 | 108.18 ▼9.18 |
Media Library /wp-admin/upload.php | 1,807 ▼0 | 5.01 ▼0.00 | 157.18 ▲11.78 | 116.34 ▼7.09 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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 items
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
Use of undefined constant HELPC_PATH - assumed 'HELPC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/help-a-charity/help-a-charity-settings.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/help-a-charity/includes/helpc-class.php:9
- > PHP Warning
require_once(HELPC_PATHhd-wp-settings-api/class-hd-wp-settings-api.php): failed to open stream: No such file or directory in wp-content/plugins/help-a-charity/help-a-charity-settings.php on line 4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/help-a-charity/help-a-charity.php:12
- > PHP Fatal error
require_once(): Failed opening required 'HELPC_PATHhd-wp-settings-api/class-hd-wp-settings-api.php' (include_path='.:/usr/share/php') in wp-content/plugins/help-a-charity/help-a-charity-settings.php on line 4
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce, donation from owner, charity, donations, donation per order
help-a-charity/help-a-charity.php 92% from 13 tests
"Help a Charity" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected752 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 202 | 258 | 671 |
CSS | 1 | 7 | 8 | 57 |
JavaScript | 1 | 9 | 2 | 24 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 31.67 |
▷ Minimum class complexity | 18.00 |
▷ Maximum class complexity | 50.00 |
Average method complexity | 3.88 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.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 | 32 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 22 | 68.75% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 10 | 31.25% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin