Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.06MB] [CPU: ▼7.81ms] Passed 4 tests
Server-side resources used by TT Discount Option for WooCommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.06 | 43.75 ▼0.69 |
Dashboard /wp-admin | 3.36 ▲0.06 | 51.50 ▼1.27 |
Posts /wp-admin/edit.php | 3.41 ▲0.06 | 44.40 ▼12.48 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.06 | 85.67 ▼16.81 |
Media Library /wp-admin/upload.php | 3.28 ▲0.06 | 40.72 ▲2.64 |
Server storage [IO: ▲0.47MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for TT Discount Option for WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲3 | 14.38 ▼0.20 | 1.60 ▼0.34 | 43.86 ▲2.76 |
Dashboard /wp-admin | 2,195 ▲18 | 5.56 ▼0.06 | 95.47 ▲6.92 | 41.98 ▲1.12 |
Posts /wp-admin/edit.php | 2,103 ▲6 | 2.01 ▼0.02 | 36.33 ▲1.28 | 32.40 ▼3.70 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.51 ▲0.34 | 657.84 ▼61.69 | 52.22 ▼12.83 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.21 ▲0.06 | 94.44 ▼20.25 | 43.82 ▼7.53 |
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
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-posts
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
No output text or server-side errors detected on direct access of PHP files
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 90% from 29 tests
readme.txt 88% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Plugin Name: Please specify the plugin name on the first line (
=== tt-discount-option-for-woocommerce ===
) - Screenshots: These screenshots have no corresponding images in /assets: #1 ([screenshot-1.png] Admin WooCommerce Settings - Discount Option), #2 ([screenshot-2.png] Admin WooCommerce Settings - Discount Option (Availability)), #3 ([screenshot-3.png] Checkout Page with Discount Row)
tt-discount-option-for-woocommerce/wc-discount-option.php 92% from 13 tests
The principal PHP file in "TT Discount Option for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tt-discount-option-for-woocommerce.php" instead of "wc-discount-option.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,263 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 3 | 67 | 83 | 811 |
PHP | 1 | 84 | 50 | 349 |
PO File | 2 | 32 | 32 | 103 |
PHP code Passed 2 tests
Analyzing 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.45 |
Average class complexity | 42.00 |
▷ Minimum class complexity | 42.00 |
▷ Maximum class complexity | 42.00 |
Average method complexity | 6.86 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 7 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 7 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
28 PNG files occupy 0.39MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/icon-woocommerce-donation-checkout.png | 9.24KB | 4.20KB | ▼ 54.56% |
assets/css/images/ui-icons_454545_256x240.png | 6.83KB | 4.17KB | ▼ 38.86% |
assets/images/icon-woocommerce-product-badge.png | 8.45KB | 4.08KB | ▼ 51.70% |
assets/images/icon-woocommerce-add-to-cart-buy-now.png | 8.33KB | 3.56KB | ▼ 57.30% |
assets/images/icon-woocommerce-custom-checkout.png | 7.52KB | 3.75KB | ▼ 50.08% |