Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.00MB] [CPU: ▼188.99ms] Passed 4 tests
Analyzing server-side resources used by EDD Force Discount
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 39.17 ▲18.07 |
Dashboard /wp-admin | 3.06 ▲0.01 | 47.77 ▲1.68 |
Posts /wp-admin/edit.php | 3.11 ▲0.00 | 47.69 ▲4.32 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.02 | 92.25 ▼763.31 |
Media Library /wp-admin/upload.php | 3.00 ▲0.00 | 34.91 ▲1.35 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for EDD Force Discount
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,702 ▲120 | 15.77 ▲0.19 | 13.14 ▲2.64 | 44.68 ▼9.15 |
Dashboard /wp-admin | 2,970 ▲39 | 5.92 ▼0.23 | 138.62 ▼9.81 | 121.31 ▲0.12 |
Posts /wp-admin/edit.php | 2,739 ▼0 | 2.70 ▼0.01 | 67.51 ▼1.67 | 92.90 ▼3.26 |
Add New Post /wp-admin/post-new.php | 1,683 ▲102 | 18.73 ▲2.33 | 378.78 ▼101.87 | 117.79 ▼1.22 |
Media Library /wp-admin/upload.php | 1,810 ▼0 | 5.02 ▼0.00 | 154.16 ▼5.21 | 117.91 ▼9.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test
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 Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: checkout, edd, digital, force, download...
edd-force-discount/edd-force-discount.php Passed 13 tests
The primary PHP file in "EDD Force Discount" version 1.0.0 is used by WordPress to initiate all plugin functionality
83 characters long description:
A lightweight plugin to force the customer to enter a discount code during checkout
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected435 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 38 | 181 | 435 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 20.33 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 52.00 |
Average method complexity | 2.45 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 40 | |
▷ Static methods | 2 | 5.00% |
▷ Public methods | 38 | 95.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 5.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.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
PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin