Benchmarks
Plugin footprint 83% from 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: ▼4.42ms] Passed 4 tests
Server-side resources used by Coupon Generator for WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 35.61 ▼3.27 |
Dashboard /wp-admin | 3.31 ▲0.00 | 44.56 ▼5.50 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.26 ▲2.49 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 89.02 ▼8.60 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 33.59 ▼0.32 |
Server storage [IO: ▲0.59MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Coupon Generator for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.19 ▼1.09 | 5.05 ▲3.24 | 39.88 ▼3.95 |
Dashboard /wp-admin | 2,209 ▲21 | 5.86 ▲0.05 | 106.08 ▲1.75 | 40.26 ▼3.95 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 1.99 ▲0.01 | 40.18 ▲3.75 | 35.10 ▲1.54 |
Add New Post /wp-admin/post-new.php | 1,529 ▲15 | 18.25 ▲0.73 | 606.48 ▼83.32 | 52.78 ▲2.25 |
Media Library /wp-admin/upload.php | 1,382 ▼3 | 4.27 ▲0.08 | 95.57 ▼7.12 | 41.85 ▲0.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- can_compress_scripts
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP Passed 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files
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)
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Start of generating coupons), #2 (Coupon options), #3 (Generation options), #4 (Generating coupons), #5 (Generated coupons)
coupon-generator-for-woocommerce/woocommerce-coupon-generator.php 92% from 13 tests
The main PHP file in "Coupon Generator for WooCommerce" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("coupon-generator-for-woocommerce.php" instead of "woocommerce-coupon-generator.php")
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
There were no executable files found in this plugin671 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 173 | 321 | 451 |
Sass | 1 | 24 | 1 | 165 |
JavaScript | 2 | 15 | 0 | 54 |
CSS | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 7.67 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 12.00 |
Average method complexity | 2.05 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.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 | 19 | |
▷ Static methods | 1 | 5.26% |
▷ Public methods | 19 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 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 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.54MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 120.19KB | 34.54KB | ▼ 71.27% |
screenshot-1.png | 121.00KB | 33.79KB | ▼ 72.07% |
screenshot-4.png | 96.35KB | 26.01KB | ▼ 73.00% |
screenshot-3.png | 86.78KB | 24.27KB | ▼ 72.03% |
screenshot-5.png | 133.75KB | 39.76KB | ▼ 70.27% |