Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▼0.00MB] [CPU: ▼9.38ms] Passed 4 tests
This is a short check of server-side resources used by Accept Donations with custom amount
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 35.08 ▼8.99 |
Dashboard /wp-admin | 3.31 ▼0.03 | 43.93 ▼15.54 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 44.19 ▲0.79 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 82.57 ▼12.90 |
Media Library /wp-admin/upload.php | 3.23 ▲0.01 | 33.19 ▼0.09 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Accept Donations with custom amount
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲47 | 13.28 ▼1.03 | 1.76 ▼0.42 | 39.46 ▼4.86 |
Dashboard /wp-admin | 2,210 ▲22 | 4.83 ▼1.02 | 99.33 ▼9.43 | 34.90 ▼13.19 |
Posts /wp-admin/edit.php | 2,092 ▲3 | 2.03 ▼0.01 | 36.34 ▼7.34 | 34.93 ▼2.54 |
Add New Post /wp-admin/post-new.php | 1,537 ▲8 | 23.40 ▲5.18 | 661.26 ▲23.79 | 70.00 ▲12.50 |
Media Library /wp-admin/upload.php | 1,392 ▲7 | 4.19 ▲0.02 | 96.44 ▼15.18 | 41.04 ▼5.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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 take a closer look at the following
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/accept-donations-with-custom-amount/public/partials/sg-donation-woocommerce-public-display.php
- > /wp-content/plugins/accept-donations-with-custom-amount/admin/partials/sg-donation-woocommerce-admin-display.php
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/accept-donations-with-custom-amount/includes/class-sg-donation-woocommerce-methods.php:3
- > PHP Fatal error
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 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line (
=== accept-donations-with-custom-amount ===
)
accept-donations-with-custom-amount/sg-donation-woocommerce.php 77% from 13 tests
The main PHP script in "Accept Donations with custom amount" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("accept-donations-with-custom-amount.php" instead of "sg-donation-woocommerce.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Description: Please keep the plugin description shorter than 140 characters (currently 167 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin256 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 128 | 543 | 250 |
JavaScript | 2 | 4 | 54 | 6 |
CSS | 2 | 0 | 8 | 0 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 1.57 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.17 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 23 | |
▷ Static methods | 2 | 8.70% |
▷ Public methods | 18 | 78.26% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 21.74% |
Functions | 7 | |
▷ Named functions | 7 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
There are no PNG files in this plugin