Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.07MB] [CPU: ▼2.70ms] Passed 4 tests
An overview of server-side resources used by WooCommerce Discount Price
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.07 | 37.88 ▼5.77 |
Dashboard /wp-admin | 3.37 ▲0.07 | 49.23 ▼0.18 |
Posts /wp-admin/edit.php | 3.49 ▲0.13 | 51.47 ▲1.82 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.09 | 94.01 ▼6.65 |
Media Library /wp-admin/upload.php | 3.30 ▲0.07 | 40.39 ▲3.89 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
ec_discount_price_setting |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WooCommerce Discount Price
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,863 ▲102 | 14.39 ▲0.02 | 2.02 ▲0.19 | 42.27 ▼7.46 |
Dashboard /wp-admin | 2,233 ▲53 | 5.58 ▼0.02 | 85.89 ▼6.71 | 42.36 ▼0.59 |
Posts /wp-admin/edit.php | 2,138 ▲41 | 1.98 ▼0.02 | 34.89 ▼1.08 | 41.85 ▲3.01 |
Add New Post /wp-admin/post-new.php | 1,459 ▼69 | 19.27 ▼3.82 | 608.59 ▼71.66 | 35.01 ▼33.86 |
Media Library /wp-admin/upload.php | 1,438 ▲41 | 4.17 ▼0.08 | 97.56 ▼9.88 | 42.78 ▼4.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested
SRP 50% 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 items
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/discount-regular-price-on-cart-checkout-page/admin/templates/settings.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: discount price display, discount price on cart, discount and regular price, discount price on checkout
discount-regular-price-on-cart-checkout-page/ec-woo-discount-price.php 77% from 13 tests
The entry point to "WooCommerce Discount Price" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
- Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "3.1.0")
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("discount-regular-price-on-cart-checkout-page.php" instead of "ec-woo-discount-price.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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 plugin363 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 165 | 417 | 340 |
JavaScript | 1 | 2 | 0 | 22 |
CSS | 1 | 1 | 4 | 1 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 5.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 1.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 30 | |
▷ Static methods | 2 | 6.67% |
▷ Public methods | 25 | 83.33% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 16.67% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
No PNG files were detected