Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼8.78ms] Passed 4 tests
Analyzing server-side resources used by Discount Rules for WooCommerce - Create Smart WooCommerce Coupons & Discounts
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 39.55 ▼2.85 |
Dashboard /wp-admin | 3.31 ▼0.04 | 48.80 ▼10.70 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.67 ▼3.26 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 94.80 ▼16.44 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 37.06 ▼4.70 |
Server storage [IO: ▲2.26MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 180 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
advanced_woo_discount_rules_load_version |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Discount Rules for WooCommerce - Create Smart WooCommerce Coupons & Discounts
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.37 ▼0.21 | 1.71 ▲0.01 | 44.44 ▲2.50 |
Dashboard /wp-admin | 2,192 ▲18 | 5.67 ▲0.10 | 92.08 ▲4.89 | 43.64 ▲2.48 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.99 ▼0.01 | 39.37 ▼1.25 | 37.74 ▼9.86 |
Add New Post /wp-admin/post-new.php | 1,549 ▼0 | 23.20 ▲0.08 | 616.73 ▼196.62 | 54.35 ▼85.40 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.22 ▲0.03 | 101.35 ▼30.86 | 44.53 ▼9.77 |
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
These items require your attention
- Zombie WordPress options detected upon uninstall: 7 options
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- advanced_woo_discount_rules_load_version
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
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
Almost there! Just fix the following items
- 2× PHP files output text when accessed directly:
- > /wp-content/plugins/woo-discount-rules/v2/App/Views/Admin/Tabs/compatible.php
- > /wp-content/plugins/woo-discount-rules/v2/App/Views/Admin/Tabs/settings.php
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-discount-rules/v2/App/Snippets/overrideCustomPrice.php:6
- > PHP Fatal error
Uncaught Error: Class 'Wdr\\App\\Controllers\\ManageDiscount' not found in wp-content/plugins/woo-discount-rules/v2/App/Controllers/Admin/Messages.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-discount-rules/v2/App/Views/Admin/review-notice.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-discount-rules/v2/App/Snippets/disableRecalculateTotal.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-discount-rules/v2/App/Snippets/recalculateTotalBeforeApplyCoupon.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
woo-discount-rules/woo-discount-rules.php 92% from 13 tests
"Discount Rules for WooCommerce - Create Smart WooCommerce Coupons & Discounts" version 2.6.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Requires at least: Required version must match the one declared in readme.txt ("4.4.1" instead of "4.6.1")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin27,029 lines of code in 170 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 141 | 1,807 | 4,716 | 21,883 |
JavaScript | 18 | 255 | 442 | 3,534 |
CSS | 8 | 91 | 59 | 1,487 |
JSON | 2 | 0 | 0 | 99 |
XML | 1 | 0 | 0 | 26 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
- Please reduce cyclomatic complexity of methods to less than 100 (currently 109)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.60 |
Average class complexity | 60.03 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 681.00 |
Average method complexity | 5.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 109.00 |
Code structure | ||
---|---|---|
Namespaces | 12 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 61 | |
▷ Abstract classes | 4 | 6.56% |
▷ Concrete classes | 57 | 93.44% |
▷ Final classes | 0 | 0.00% |
Methods | 826 | |
▷ Static methods | 258 | 31.23% |
▷ Public methods | 669 | 80.99% |
▷ Protected methods | 143 | 17.31% |
▷ Private methods | 14 | 1.69% |
Functions | 66 | |
▷ Named functions | 10 | 15.15% |
▷ Anonymous functions | 56 | 84.85% |
Constants | 18 | |
▷ Global constants | 13 | 72.22% |
▷ Class constants | 5 | 27.78% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
v2/Assets/Js/Jquery-ui/images/ui-icons_555555_256x240.png | 6.96KB | 4.18KB | ▼ 39.91% |
v2/Assets/Js/Jquery-ui/images/ui-icons_777620_256x240.png | 4.56KB | 4.18KB | ▼ 8.31% |
v2/Assets/Js/Jquery-ui/images/ui-icons_777777_256x240.png | 7.00KB | 4.18KB | ▼ 40.22% |
v2/Assets/Js/Jquery-ui/images/ui-icons_cc0000_256x240.png | 4.56KB | 4.18KB | ▼ 8.31% |
v2/Assets/Js/Jquery-ui/images/ui-icons_ffffff_256x240.png | 6.39KB | 4.18KB | ▼ 34.52% |