Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.05MB] [CPU: ▼2.60ms] Passed 4 tests
This is a short check of server-side resources used by Discount and regular price cart and checkout page display WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.06 | 34.91 ▼7.72 |
Dashboard /wp-admin | 3.37 ▲0.02 | 50.61 ▼4.89 |
Posts /wp-admin/edit.php | 3.48 ▲0.13 | 51.01 ▲4.81 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 96.68 ▲0.54 |
Media Library /wp-admin/upload.php | 3.29 ▲0.06 | 35.85 ▲1.67 |
Discount Price /wp-admin/admin.php?page=woo-discount-price | 3.26 | 34.33 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
woodiscpr_you_save |
widget_theysaidso_widget |
theysaidso_admin_options |
count_load_time_woo_discount |
db_upgraded |
woodiscpr_taxexcl |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Discount and regular price cart and checkout page display WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲42 | 14.26 ▲0.01 | 1.54 ▼0.21 | 36.86 ▼7.02 |
Dashboard /wp-admin | 2,203 ▲23 | 5.54 ▼0.08 | 90.47 ▲2.23 | 41.02 ▲1.83 |
Posts /wp-admin/edit.php | 2,118 ▲18 | 2.00 ▲0.05 | 41.56 ▲1.09 | 36.03 ▼5.93 |
Add New Post /wp-admin/post-new.php | 1,535 ▲9 | 23.40 ▲0.22 | 662.73 ▲6.25 | 80.73 ▲31.70 |
Media Library /wp-admin/upload.php | 1,417 ▲20 | 4.17 ▼0.02 | 97.71 ▼1.42 | 41.81 ▼0.76 |
Discount Price /wp-admin/admin.php?page=woo-discount-price | 857 | 2.17 | 27.94 | 25.23 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The uninstall procedure has failed, leaving 8 options in the database
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- woodiscpr_taxexcl
- can_compress_scripts
- widget_theysaidso_widget
- count_load_time_woo_discount
- widget_recent-posts
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
Even though everything seems fine, this is not an exhaustive test
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
Almost there! Just fix the following items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/woo-discount-price/inc/setup-file.php
- 2× 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-price/woo-discount-price.php:24
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-discount-price/inc/notice_recensione.php:75
- > 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)
No browser issues were found
Optimizations
Plugin configuration 93% 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 to be fixed:
- Tags: Please delete some tags, you are using 13 tag instead of maximum 10
woo-discount-price/woo-discount-price.php 92% from 13 tests
The principal PHP file in "Discount and regular price cart and checkout page display WooCommerce" v. 1.3.8 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "7.0")
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
No dangerous file extensions were detected414 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 244 | 48 | 360 |
PO File | 2 | 14 | 18 | 48 |
CSS | 1 | 0 | 0 | 6 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 6.00 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 6 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 6 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 12 | |
▷ Named functions | 11 | 91.67% |
▷ Anonymous functions | 1 | 8.33% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/image/email_discount_price.png | 11.79KB | 10.03KB | ▼ 14.96% |