Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.15MB] [CPU: ▼155.99ms] Passed 4 tests
Analyzing server-side resources used by Edd Discounts By Location
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.86 ▲0.02 | 35.36 ▲2.54 |
Dashboard /wp-admin | 2.99 ▼0.06 | 34.83 ▼17.12 |
Posts /wp-admin/edit.php | 3.05 ▼0.06 | 32.45 ▼9.39 |
Add New Post /wp-admin/post-new.php | 4.98 ▼0.45 | 76.79 ▼587.51 |
Media Library /wp-admin/upload.php | 3.00 ▼0.01 | 27.60 ▼9.95 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Edd Discounts By Location
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,724 ▲128 | 15.91 ▲0.33 | 11.01 ▲1.20 | 46.71 ▼2.22 |
Dashboard /wp-admin | 2,988 ▲54 | 5.97 ▲0.01 | 132.90 ▼39.04 | 110.81 ▼44.66 |
Posts /wp-admin/edit.php | 2,762 ▲23 | 2.72 ▲0.00 | 63.31 ▼8.91 | 93.80 ▼3.24 |
Add New Post /wp-admin/post-new.php | 1,685 ▲185 | 18.86 ▲0.22 | 371.92 ▲1.58 | 108.47 ▲4.56 |
Media Library /wp-admin/upload.php | 1,831 ▲24 | 5.01 ▼0.03 | 148.57 ▼4.37 | 116.88 ▼0.32 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/edd-discounts-by-location/includes/class-dc-dependencies.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 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
Please fix the following attributes:
- Screenshots: Please add an image for screenshot #3 (If the discount code is valid for the country then the user can purchse the product with the discount code.)
edd-discounts-by-location/edd_discounts_by_location.php 92% from 13 tests
Analyzing the main PHP file in "Edd Discounts By Location" version 1.0.1
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("edd-discounts-by-location.php" instead of "edd_discounts_by_location.php")
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
Everything looks great! No dangerous files found in this plugin489 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 75 | 65 | 361 |
PO File | 1 | 30 | 31 | 76 |
CSS | 1 | 7 | 0 | 40 |
JavaScript | 2 | 1 | 27 | 12 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 6.80 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 17.00 |
Average method complexity | 2.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 25 | |
▷ Static methods | 2 | 8.00% |
▷ Public methods | 25 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 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
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/dualcube.png | 3.29KB | 0.65KB | ▼ 80.17% |
assets/images/dualcube_logo.png | 3.86KB | 3.47KB | ▼ 9.97% |
assets/images/placeholder.png | 2.75KB | 2.92KB | 0.00% |
assets/images/dclogo-2x.png | 4.35KB | 1.74KB | ▼ 60.10% |
assets/images/dclogo.png | 3.46KB | 0.84KB | ▼ 75.80% |