Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.00MB] [CPU: ▼140.61ms] Passed 4 tests
A check of server-side resources used by WC Return products
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 34.44 ▲13.29 |
Dashboard /wp-admin | 3.06 ▲0.00 | 43.27 ▲4.41 |
Posts /wp-admin/edit.php | 3.11 ▲0.00 | 43.46 ▼0.47 |
Add New Post /wp-admin/post-new.php | 5.42 ▼0.02 | 87.13 ▼564.28 |
Media Library /wp-admin/upload.php | 3.00 ▲0.00 | 30.24 ▼2.08 |
Server storage [IO: ▲0.21MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
A check of browser resources used by WC Return products
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,703 ▲107 | 15.76 ▲0.27 | 10.22 ▲0.52 | 47.50 ▼4.08 |
Dashboard /wp-admin | 2,992 ▲58 | 5.91 ▼0.16 | 136.48 ▼2.04 | 103.98 ▼13.51 |
Posts /wp-admin/edit.php | 2,736 ▼3 | 2.68 ▼0.01 | 65.53 ▼4.01 | 90.72 ▲1.90 |
Add New Post /wp-admin/post-new.php | 1,504 ▼553 | 18.56 ▼0.78 | 350.11 ▼19.48 | 106.57 ▼0.88 |
Media Library /wp-admin/upload.php | 1,810 ▲3 | 5.01 ▼0.00 | 167.21 ▲27.96 | 117.94 ▲1.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wc-return-product/includes/wc_functions.php:25
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== wc-return-product ===
)
wc-return-product/wc_return_product.php 85% from 13 tests
Analyzing the main PHP file in "WC Return products" version 1.5
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("wc-return-product.php" instead of "wc_return_product.php")
- Text Domain: Please use dashes and lowercase characters for text domains
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin900 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 90 | 73 | 560 |
PO File | 5 | 76 | 147 | 254 |
JavaScript | 1 | 14 | 8 | 86 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 15 | |
▷ Named functions | 15 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 162.00KB | 48.29KB | ▼ 70.19% |
assets/CustomOrderStatus.png | 1.95KB | 0.74KB | ▼ 61.99% |