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.00MB] [CPU: ▼4.12ms] Passed 4 tests
A check of server-side resources used by WC Active Payment Discount
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 38.42 ▼4.34 |
Dashboard /wp-admin | 3.31 ▲0.00 | 48.82 ▼1.20 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 45.99 ▼2.21 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.82 ▼5.85 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.15 ▼4.06 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
Checking browser requirements for WC Active Payment Discount
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 14.82 ▲0.05 | 1.78 ▼0.15 | 42.99 ▼9.37 |
Dashboard /wp-admin | 2,206 ▲18 | 4.89 ▼0.90 | 110.00 ▼5.09 | 42.13 ▼1.32 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.05 ▲0.01 | 33.27 ▼5.05 | 34.12 ▼0.25 |
Add New Post /wp-admin/post-new.php | 1,514 ▼0 | 17.49 ▲0.01 | 686.58 ▲5.83 | 55.99 ▼1.77 |
Media Library /wp-admin/upload.php | 1,391 ▲3 | 4.20 ▼0.01 | 94.86 ▼13.46 | 42.91 ▼6.47 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 50% 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)
Good news, no errors were detected
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 take a closer look at the following
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wc-active-payment-discount/public/partials/wc-active-payment-discount-public-display.php
- > /wp-content/plugins/wc-active-payment-discount/admin/partials/wc-active-payment-discount-admin-display.php
- 1× 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/wc-active-payment-discount/includes/class-wc-active-payment-discount-settings.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
- Screenshots: Please add an image for screenshot #1 (Admin Settings)
wc-active-payment-discount/wc-active-payment-discount.php Passed 13 tests
This is the main PHP file of "WC Active Payment Discount" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
80 characters long description:
WC Active Payment Discount is used for get discount on activated payment method.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin552 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 165 | 557 | 407 |
JavaScript | 2 | 25 | 27 | 122 |
CSS | 2 | 0 | 4 | 15 |
SVG | 1 | 0 | 0 | 8 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 4.25 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 23.00 |
Average method complexity | 1.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 29 | |
▷ Static methods | 2 | 6.90% |
▷ Public methods | 24 | 82.76% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 17.24% |
Functions | 5 | |
▷ Named functions | 5 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 38.52KB | 20.67KB | ▼ 46.35% |