Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼0.61ms] Passed 4 tests
Analyzing server-side resources used by Conditional discount / bulk discounts for WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 33.48 ▼6.03 |
Dashboard /wp-admin | 3.31 ▲0.00 | 50.64 ▲5.41 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.43 ▲2.37 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 91.66 ▲2.44 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 30.26 ▼1.22 |
Server storage [IO: ▲1.17MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 112 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Checking browser requirements for Conditional discount / bulk discounts for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲28 | 14.70 ▲0.43 | 1.72 ▲0.09 | 36.62 ▼7.34 |
Dashboard /wp-admin | 2,195 ▲15 | 5.62 ▼0.07 | 92.57 ▲7.09 | 39.66 ▲0.68 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.94 ▼0.06 | 40.04 ▲1.59 | 36.50 ▲0.19 |
Add New Post /wp-admin/post-new.php | 1,526 ▼9 | 23.00 ▼0.15 | 598.86 ▼58.14 | 56.72 ▲4.12 |
Media Library /wp-admin/upload.php | 1,394 ▼6 | 4.18 ▲0.01 | 97.24 ▼5.00 | 42.47 ▲1.30 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/conditional-discount-rule-for-woocommerce/includes/pisol.class.form.php
- 55× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/rules/weight.php:8
- > PHP Warning
Use of undefined constant PI_CDRW_SELECTION_RULE_SLUG - assumed 'PI_CDRW_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/rules/delivery_type.php on line 139
- > PHP Warning
Use of undefined constant PI_CDRW_SELECTION_RULE_SLUG - assumed 'PI_CDRW_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/rules/selected_delivery_day.php on line 157
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-discount-rule-for-woocommerce/public/class-future-template.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/rules/coupon.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/rules/user.php:8
- > PHP Warning
Use of undefined constant PI_CDRW_SELECTION_RULE_SLUG - assumed 'PI_CDRW_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/rules/shipping_class.php on line 122
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/coupons-template/class-conditional-discount-rule-woocommerce-future-coupon-lists.php:72
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/pisol_selection_rule_main.php:239
- > PHP Warning
Use of undefined constant PI_CDRW_SELECTION_RULE_SLUG - assumed 'PI_CDRW_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/conditional-discount-rule-for-woocommerce/admin/selection_rules/rules/quantity.php on line 126
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
- Donate link: Invalid URI found ("piwebsolution.com")
- Screenshots: These screenshots need descriptions #1, #2, #3, #4 in conditional-discount-rule-for-woocommerce/assets to your readme.txt
conditional-discount-rule-for-woocommerce/conditional-discount-rule-woocommerce.php 85% from 13 tests
This is the main PHP file of "Conditional discount / bulk discounts for WooCommerce" version 1.9.37.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("conditional-discount-rule-for-woocommerce.php" instead of "conditional-discount-rule-woocommerce.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin19,392 lines of code in 73 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 5 | 2,072 | 88 | 10,535 |
PHP | 57 | 1,420 | 601 | 5,305 |
SVG | 7 | 10 | 6 | 3,208 |
JavaScript | 4 | 60 | 76 | 344 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 15.57 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 57.00 |
Average method complexity | 2.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 25.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 44 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 44 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 346 | |
▷ Static methods | 52 | 15.03% |
▷ Public methods | 340 | 98.27% |
▷ Protected methods | 1 | 0.29% |
▷ Private methods | 5 | 1.45% |
Functions | 10 | |
▷ Named functions | 9 | 90.00% |
▷ Anonymous functions | 1 | 10.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
31 PNG files occupy 0.16MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png | 0.45KB | 0.15KB | ▼ 65.65% |
includes/background.png | 74.27KB | 26.29KB | ▼ 64.60% |
admin/css/images/ui-icons_228ef1_256x240.png | 4.49KB | 4.18KB | ▼ 6.89% |
admin/css/images/ui-bg_glass_100_f6f6f6_1x400.png | 0.29KB | 0.12KB | ▼ 59.47% |
admin/css/images/ui-icons_ef8c08_256x240.png | 4.49KB | 4.18KB | ▼ 6.89% |