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
Installer ran successfully
Server metrics [RAM: ▲0.66MB] [CPU: ▼10.18ms] Passed 4 tests
A check of server-side resources used by Conditional Discounts for WooCommerce - A simple yet complete woocommerce dynamic pricing plugin
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.09 ▲0.63 | 36.18 ▼7.35 |
Dashboard /wp-admin | 4.03 ▲0.68 | 49.62 ▼15.18 |
Posts /wp-admin/edit.php | 4.08 ▲0.72 | 50.61 ▲3.41 |
Add New Post /wp-admin/post-new.php | 6.57 ▲0.68 | 93.20 ▼21.58 |
Media Library /wp-admin/upload.php | 3.89 ▲0.66 | 39.94 ▲6.97 |
Discounts /wp-admin/edit.php?post_type=o-discount | 3.99 | 39.49 |
New discount /wp-admin/post-new.php?post_type=o-discount | 4.01 | 48.65 |
Server storage [IO: ▲0.64MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 78 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
Conditional Discounts for WooCommerce - A simple yet complete woocommerce dynamic pricing plugin: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,850 ▲104 | 13.84 ▼0.90 | 4.66 ▲2.62 | 18.23 ▼24.77 |
Dashboard /wp-admin | 2,281 ▲93 | 5.07 ▼0.79 | 101.79 ▼3.69 | 86.70 ▲45.24 |
Posts /wp-admin/edit.php | 2,182 ▲111 | 2.34 ▲0.29 | 43.80 ▲8.35 | 38.31 ▲4.24 |
Add New Post /wp-admin/post-new.php | 1,601 ▲68 | 23.40 ▲0.32 | 613.15 ▼43.27 | 44.09 ▼9.21 |
Media Library /wp-admin/upload.php | 1,472 ▲87 | 4.50 ▲0.30 | 99.67 ▼1.25 | 72.80 ▲28.56 |
Discounts /wp-admin/edit.php?post_type=o-discount | 1,171 | 2.27 | 32.54 | 30.42 |
New discount /wp-admin/post-new.php?post_type=o-discount | 2,011 | 2.92 | 72.53 | 82.53 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 6 options
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 75% 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 50% 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
The following issues need your attention
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-advanced-discounts/includes/class-wad-products-list.php:151
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
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
These attributes need your attention:
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
woo-advanced-discounts/wad.php 77% from 13 tests
The main file in "Conditional Discounts for WooCommerce - A simple yet complete woocommerce dynamic pricing plugin" v. 2.31.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 96 characters long)
- Requires at least: The required version number must match the one declared in readme.txt ("3.5" instead of "3.0.0")
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-advanced-discounts.php" instead of "wad.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected10,251 lines of code in 40 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 510 | 1,053 | 3,595 |
CSS | 11 | 170 | 178 | 3,245 |
JavaScript | 12 | 298 | 190 | 2,584 |
PO File | 2 | 314 | 324 | 803 |
SVG | 1 | 0 | 1 | 24 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 108)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 43.70 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 200.00 |
Average method complexity | 4.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 108.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 122 | |
▷ Static methods | 24 | 19.67% |
▷ Public methods | 105 | 86.07% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 17 | 13.93% |
Functions | 28 | |
▷ Named functions | 19 | 67.86% |
▷ Anonymous functions | 9 | 32.14% |
Constants | 6 | |
▷ Global constants | 5 | 83.33% |
▷ Class constants | 1 | 16.67% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
25 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/images/wad-dashicon---.png | 17.31KB | 0.57KB | ▼ 96.72% |
admin/js/o-datepicker/images/custom_t.png | 0.16KB | 0.11KB | ▼ 32.08% |
admin/js/o-datepicker/images/custom_r.png | 0.16KB | 0.11KB | ▼ 32.12% |
admin/js/o-datepicker/images/custom_b.png | 0.17KB | 0.13KB | ▼ 27.93% |
admin/js/o-datepicker/images/datepicker_l.png | 0.13KB | 0.11KB | ▼ 16.79% |