Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.58MB] [CPU: ▼4.58ms] Passed 4 tests
Server-side resources used by Flexible PDF Coupons - Gift Cards & Vouchers for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.05 ▲0.59 | 43.32 ▼0.20 |
Dashboard /wp-admin | 3.89 ▲0.58 | 49.03 ▼1.57 |
Posts /wp-admin/edit.php | 3.94 ▲0.58 | 50.88 ▼5.97 |
Add New Post /wp-admin/post-new.php | 6.47 ▲0.58 | 86.75 ▼10.57 |
Media Library /wp-admin/upload.php | 3.81 ▲0.58 | 37.45 ▲2.25 |
Server storage [IO: ▲82.58MB] [DB: ▲0.00MB] 67% from 3 tests
Filesystem and database footprint
Please try to fix the following items
- Total filesystem usage must be limited to 25MB (currently using 82.58MB)
Filesystem: 1,195 new files
Database: no new tables, 8 new options
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
widget_recent-comments |
widget_theysaidso_widget |
plugin_activation_flexible-coupons/flexible-coupons.php |
can_compress_scripts |
wpdesk_requirements_plugins_data |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Flexible PDF Coupons - Gift Cards & Vouchers for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲56 | 14.70 ▲0.45 | 1.94 ▲0.08 | 43.95 ▼3.30 |
Dashboard /wp-admin | 2,198 ▲18 | 5.62 ▲0.01 | 91.33 ▼8.57 | 41.42 ▼4.99 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.01 ▲0.04 | 40.41 ▼0.58 | 38.36 ▲0.49 |
Add New Post /wp-admin/post-new.php | 1,529 ▲3 | 23.16 ▼0.37 | 664.69 ▼25.56 | 65.31 ▲3.04 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.27 ▲0.06 | 101.12 ▲0.43 | 46.97 ▲4.62 |
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
Please fix the following items
- This plugin did not uninstall successfully, leaving 7 options in the database
- db_upgraded
- plugin_activation_flexible-coupons/flexible-coupons.php
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
- 6× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-coupons-core/src/Coupons/Settings/Views/menu.php
- > /wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-wpdesk-marketing/src/Boxes/Views/row_open.php
- > /wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-wpdesk-marketing/src/Boxes/Views/row_close.php
- > /wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-coupons-core/src/Coupons/Settings/Views/footer.php
- > /wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-forms/templates/form-end.php
- > /wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-wpdesk-marketing/src/Boxes/Views/all.php
- 648× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'FlexibleCouponsVendor\\Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/flexible-coupons/vendor_prefixed/mpdf/mpdf/src/Tag/Main.php:5
- > PHP Fatal error
Uncaught Error: Class 'FlexibleCouponsVendor\\Monolog\\Handler\\Handler' not found in wp-content/plugins/flexible-coupons/vendor_prefixed/monolog/monolog/src/Monolog/Handler/GroupHandler.php:23
- > PHP Notice
Undefined index: is_premium in wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-coupons-core/src/Coupons/Views/dashboard/fields/coupon-code-prefix.php on line 19
- > PHP Fatal error
Uncaught Error: Call to a member function output_render() on null in wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-forms/templates/input-text.php:12
- > PHP Fatal error
Uncaught Error: Class 'FlexibleCouponsVendor\\Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/flexible-coupons/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php:19
- > PHP Fatal error
Uncaught Error: Interface 'FlexibleCouponsVendor\\WPDesk\\Persistence\\PersistentContainer' not found in wp-content/plugins/flexible-coupons/vendor_prefixed/wpdesk/wp-persistence/src/DeferredPersistentContainer.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/flexible-coupons/vendor/psr/log/Psr/Log/AbstractLogger.php:12
- > PHP Fatal error
Uncaught Error: Class 'FlexibleCouponsVendor\\Mpdf\\Tag\\BlockTag' not found in wp-content/plugins/flexible-coupons/vendor_prefixed/mpdf/mpdf/src/Tag/BlockQuote.php:5
- > PHP Fatal error
Uncaught Error: Interface 'FlexibleCouponsVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/flexible-coupons/src/Plugin/Settings/GeneralSettings.php:23
- > PHP Fatal error
Uncaught Error: Class 'FlexibleCouponsVendor\\Mpdf\\Tag\\SubstituteTag' not found in wp-content/plugins/flexible-coupons/vendor_prefixed/mpdf/mpdf/src/Tag/Ttz.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: vouchers, gift cards, woocommerce coupon, woocommerce voucher, woocommerce gift cards
flexible-coupons/flexible-coupons.php 69% from 13 tests
The main PHP script in "Flexible PDF Coupons - Gift Cards & Vouchers for WooCommerce" version 1.9.0 is automatically included on every request by WordPress
Please take the time to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 183 characters long)
- Git Repository: A Git repository was detected inside this plugin
- Requires PHP: Required version does not match the one declared in readme.txt ("7.2" instead of "7.3")
- Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "5.8")
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin134,952 lines of code in 963 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 873 | 2,653 | 29,129 | 90,313 |
JavaScript | 35 | 10,370 | 10,015 | 41,362 |
JSON | 28 | 0 | 0 | 1,754 |
CSS | 18 | 233 | 87 | 1,363 |
Markdown | 4 | 16 | 0 | 68 |
XML | 3 | 13 | 0 | 60 |
PO File | 1 | 3 | 3 | 25 |
YAML | 1 | 2 | 0 | 7 |
PHP code 0% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Class cyclomatic complexity should be reduced to less than 1000 (currently 7,009)
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 460)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 28.73 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 7,009.00 |
Average method complexity | 7.21 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 460.00 |
Code structure | ||
---|---|---|
Namespaces | 124 | |
Interfaces | 74 | |
Traits | 19 | |
Classes | 615 | |
▷ Abstract classes | 27 | 4.39% |
▷ Concrete classes | 588 | 95.61% |
▷ Final classes | 37 | 6.29% |
Methods | 3,364 | |
▷ Static methods | 279 | 8.29% |
▷ Public methods | 2,689 | 79.93% |
▷ Protected methods | 286 | 8.50% |
▷ Private methods | 389 | 11.56% |
Functions | 124 | |
▷ Named functions | 40 | 32.26% |
▷ Anonymous functions | 84 | 67.74% |
Constants | 630 | |
▷ Global constants | 5 | 0.79% |
▷ Class constants | 625 | 99.21% |
▷ Public constants | 597 | 95.52% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
55 PNG files occupy 5.93MB with 2.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/repository/screenshot-17.png | 7.10KB | 7.33KB | 0.00% |
assets/repository/banner-772x250.png | 17.96KB | 7.20KB | ▼ 59.88% |
assets/repository/screenshot-13.png | 126.28KB | 135.20KB | 0.00% |
assets/repository/screenshot-51.png | 224.78KB | 66.97KB | ▼ 70.21% |
assets/repository/screenshot-52.png | 74.78KB | 30.19KB | ▼ 59.63% |