Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼309.55ms] Passed 4 tests
This is a short check of server-side resources used by Dynamic Pricing With Discount Rules for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.04 | 56.26 ▲6.28 |
Dashboard /wp-admin | 3.46 ▲0.06 | 34.72 ▼7.55 |
Posts /wp-admin/edit.php | 3.69 ▲0.05 | 35.94 ▼6.13 |
Add New Post /wp-admin/post-new.php | 6.95 ▼0.02 | 93.82 ▼1,223.45 |
Media Library /wp-admin/upload.php | 3.34 ▲0.05 | 24.60 ▼1.08 |
Server storage [IO: ▲1.53MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 1 new option
New WordPress options |
---|
awdp_version |
Browser metrics Passed 4 tests
Checking browser requirements for Dynamic Pricing With Discount Rules for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,763 ▲9 | 16.17 ▲0.38 | 5.56 ▼0.52 | 2.31 ▼0.20 |
Dashboard /wp-admin | 2,895 ▲41 | 6.01 ▼0.13 | 121.24 ▼13.39 | 155.03 ▼1.01 |
Posts /wp-admin/edit.php | 2,688 ▼6 | 3.24 ▲0.00 | 63.88 ▲0.24 | 141.00 ▼3.43 |
Add New Post /wp-admin/post-new.php | 1,668 ▼92 | 19.71 ▼2.86 | 382.20 ▼67.47 | 155.86 ▼8.94 |
Media Library /wp-admin/upload.php | 1,701 ▲3 | 5.52 ▲0.04 | 137.18 ▼12.68 | 189.23 ▲4.45 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- Zombie WordPress options were found after uninstall: 1 option
- awdp_version
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 3× PHP files output text when accessed directly:
- > /wp-content/plugins/aco-woo-dynamic-pricing/includes/views/admin-settings.php
- > /wp-content/plugins/aco-woo-dynamic-pricing/includes/views/admin-lists.php
- > /wp-content/plugins/aco-woo-dynamic-pricing/includes/views/admin-root.php
- 4× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
Use of undefined constant AWDP_TOKEN - assumed 'AWDP_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-woo-dynamic-pricing/includes/views/admin-lists.php on line 1
- > PHP Warning
Use of undefined constant AWDP_TOKEN - assumed 'AWDP_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-woo-dynamic-pricing/includes/views/admin-settings.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/aco-woo-dynamic-pricing/start.php:28
- > PHP Warning
Use of undefined constant AWDP_TOKEN - assumed 'AWDP_TOKEN' (this will throw an Error in a future version of PHP) in wp-content/plugins/aco-woo-dynamic-pricing/includes/views/admin-root.php on line 1
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- Donate link: Invalid url: ""
aco-woo-dynamic-pricing/start.php 85% from 13 tests
The primary PHP file in "Dynamic Pricing With Discount Rules for WooCommerce" version 4.1.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("aco-woo-dynamic-pricing.php" instead of "start.php")
- Description: Please keep the plugin description shorter than 140 characters (currently 152 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected5,221 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 17 | 981 | 636 | 3,798 |
JSON | 1 | 0 | 0 | 789 |
PO File | 1 | 227 | 227 | 479 |
CSS | 1 | 19 | 1 | 132 |
XML | 1 | 0 | 0 | 21 |
JavaScript | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 282)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 90.17 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 380.00 |
Average method complexity | 11.49 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 282.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 102 | |
▷ Static methods | 5 | 4.90% |
▷ Public methods | 100 | 98.04% |
▷ Protected methods | 1 | 0.98% |
▷ Private methods | 1 | 0.98% |
Functions | 7 | |
▷ Named functions | 3 | 42.86% |
▷ Anonymous functions | 4 | 57.14% |
Constants | 11 | |
▷ Global constants | 11 | 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
16 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/edit.png | 0.61KB | 0.61KB | 0.00% |
assets/images/link-go.png | 1.02KB | 0.24KB | ▼ 77.00% |
assets/images/image-actions-old.png | 2.22KB | 1.02KB | ▼ 54.26% |
assets/images/icon.png | 1.15KB | 0.47KB | ▼ 59.06% |
assets/images/scheduler-icons.png | 2.25KB | 1.23KB | ▼ 45.26% |