Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.01MB] [CPU: ▼5.35ms] Passed 4 tests
Server-side resources used by BW Coupon
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 43.96 ▲4.17 |
Dashboard /wp-admin | 3.31 ▼0.04 | 45.35 ▼16.06 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.28 ▼2.28 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 94.65 ▼1.58 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.53 ▼1.47 |
Server storage [IO: ▲13.91MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 346 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by BW Coupon
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲53 | 14.17 ▼0.38 | 1.73 ▼0.01 | 40.35 ▼0.96 |
Dashboard /wp-admin | 2,192 ▲18 | 5.55 ▼0.13 | 85.11 ▼6.31 | 36.57 ▼8.46 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.04 ▲0.05 | 38.48 ▲3.75 | 34.59 ▼2.50 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.32 ▲0.29 | 582.05 ▼86.13 | 59.16 ▼3.42 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.21 ▼0.15 | 99.63 ▼7.31 | 44.39 ▼3.13 |
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
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/bw-coupon/lib/dompdf/vendor/masterminds/html5/bin/entities.php
- 133× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/sabberworm/php-css-parser/src/CSSList/AtRuleBlockList.php:11
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\Value\\CSSFunction' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/sabberworm/php-css-parser/src/Value/Color.php:10
- > PHP Fatal error
Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/phenx/php-svg-lib/src/Svg/Document.php:30
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Positioner\\AbstractPositioner' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/dompdf/dompdf/src/Positioner/TableCell.php:17
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/phenx/php-font-lib/src/FontLib/Table/Type/name.php:19
- > PHP Fatal error
Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/sabberworm/php-css-parser/src/Value/Value.php:11
- > PHP Fatal error
Uncaught Error: Class 'Sabberworm\\CSS\\CSSList\\CSSBlockList' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/sabberworm/php-css-parser/src/CSSList/Document.php:17
- > PHP Fatal error
Uncaught Error: Class 'Dompdf\\Renderer\\Block' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/dompdf/dompdf/src/Renderer/TableCell.php:17
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/phenx/php-font-lib/src/FontLib/Table/Table.php:19
- > PHP Fatal error
Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/bw-coupon/lib/dompdf/vendor/phenx/php-font-lib/src/FontLib/Table/Type/hmtx.php:17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Contributors: Plugin contributors not specified
bw-coupon/bwc.php 85% from 13 tests
The main file in "BW Coupon" v. 1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bw-coupon.php" instead of "bwc.php")
- Description: The description should be shorter than 140 characters (currently 236 characters long)
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
Good job! No executable or dangerous file extensions detected45,776 lines of code in 251 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 213 | 8,859 | 17,020 | 41,389 |
JSON | 11 | 0 | 0 | 1,758 |
Markdown | 12 | 451 | 0 | 1,415 |
CSS | 2 | 127 | 37 | 597 |
PO File | 3 | 147 | 156 | 357 |
JavaScript | 2 | 49 | 6 | 189 |
YAML | 1 | 9 | 0 | 35 |
HTML | 1 | 0 | 0 | 17 |
Bourne Shell | 5 | 2 | 0 | 11 |
SVG | 1 | 0 | 0 | 8 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 32.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 811.00 |
Average method complexity | 3.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 98.00 |
Code structure | ||
---|---|---|
Namespaces | 37 | |
Interfaces | 9 | |
Traits | 0 | |
Classes | 189 | |
▷ Abstract classes | 12 | 6.35% |
▷ Concrete classes | 177 | 93.65% |
▷ Final classes | 0 | 0.00% |
Methods | 2,179 | |
▷ Static methods | 142 | 6.52% |
▷ Public methods | 1,716 | 78.75% |
▷ Protected methods | 405 | 18.59% |
▷ Private methods | 58 | 2.66% |
Functions | 90 | |
▷ Named functions | 63 | 70.00% |
▷ Anonymous functions | 27 | 30.00% |
Constants | 220 | |
▷ Global constants | 6 | 2.73% |
▷ Class constants | 214 | 97.27% |
▷ Public constants | 209 | 97.66% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 3.33MB with 1.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/banner-600x256.png | 270.12KB | 94.71KB | ▼ 64.94% |
admin/images/woocommerce_gift_coupon-icon.png | 0.37KB | 0.48KB | 0.00% |
lib/dompdf/vendor/dompdf/dompdf/lib/res/broken_image.png | 0.60KB | 0.47KB | ▼ 22.33% |
assets/icon-256x256.png | 100.29KB | 38.83KB | ▼ 61.29% |
docs/BWC_Settings-1.png | 158.08KB | 47.42KB | ▼ 70.00% |