Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲5.14MB] [CPU: ▼106.58ms] 75% from 4 tests
A check of server-side resources used by KVoucher
It is recommended to improve the following
- Extra RAM: Try to keep extra memory usage under 5MB (currently 5.14MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.58 ▲5.86 | 50.03 ▲32.76 |
Dashboard /wp-admin | 8.60 ▲5.55 | 75.06 ▲30.41 |
Posts /wp-admin/edit.php | 8.60 ▲5.50 | 73.45 ▲30.33 |
Add New Post /wp-admin/post-new.php | 9.34 ▲3.91 | 115.98 ▼513.22 |
Media Library /wp-admin/upload.php | 8.60 ▲5.60 | 57.40 ▲26.18 |
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius | 8.60 | 55.04 |
Server storage [IO: ▲3.10MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 189 new files
Database: 1 new table, 9 new options
New tables |
---|
wp_usr_kvoucher |
New WordPress options |
---|
fs_accounts |
fs_debug_mode |
kvoucher_plugin_paypal_textfiels |
kvoucher_coupon_id |
kvoucher_plugin_style_textfiels |
fs_active_plugins |
fs_gdpr |
kvoucher_plugin_company_textfiels |
kvoucher_plugin_terms_of_service_textfields |
Browser metrics Passed 4 tests
KVoucher: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,332 ▲736 | 19.02 ▲3.50 | 24.85 ▲16.41 | 45.35 ▼1.38 |
Dashboard /wp-admin | 3,204 ▲314 | 7.51 ▲1.67 | 149.07 ▲7.88 | 129.80 ▲24.96 |
Posts /wp-admin/edit.php | 3,031 ▲292 | 4.41 ▲1.71 | 77.21 ▲11.97 | 110.81 ▲15.50 |
Add New Post /wp-admin/post-new.php | 1,706 ▲34 | 18.42 ▼0.50 | 336.19 ▼35.75 | 129.16 ▲17.70 |
Media Library /wp-admin/upload.php | 1,804 ▼6 | 4.75 ▼0.25 | 119.25 ▼29.07 | 144.24 ▲29.79 |
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius | 1,733 | 3.36 | 72.82 | 98.46 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 25% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/kvoucher/freemius/includes/class-freemius.php+8552
Undefined property: stdClass::$plugins
- The uninstall procedure failed, leaving 1 table in the database
- wp_usr_kvoucher
- This plugin did not uninstall successfully, leaving 9 options in the database
- kvoucher_plugin_style_textfiels
- kvoucher_plugin_terms_of_service_textfields
- fs_accounts
- fs_active_plugins
- kvoucher_plugin_company_textfiels
- fs_debug_mode
- kvoucher_coupon_id
- fs_gdpr
- kvoucher_plugin_paypal_textfiels
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% from 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
Almost there! Just fix the following items
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/kvoucher/freemius/templates/ajax-loader.php
- 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kvoucher/php/ScTermsOfServiceSettings.php:18
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/kvoucher/freemius/templates/account/partials/addon.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/kvoucher/freemius/templates/partials/network-activation.php:6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/kvoucher/freemius/templates/account/partials/addon.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kvoucher/php/ScCompanySettings.php:48
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kvoucher/php/ScPayPalSettings.php:20
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kvoucher/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/kvoucher/freemius/templates/account/partials/addon.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kvoucher/php/ScStyleSettings.php:50
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/kvoucher/freemius/templates/account/partials/addon.php on line 7
- > 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 96% from 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: pdf voucher, coupon, pdf, pdf coupon, voucher...
kvoucher/kvoucher.php 92% from 13 tests
The entry point to "KVoucher" version 1.1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected32,712 lines of code in 140 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 117 | 7,634 | 16,175 | 31,697 |
PO File | 2 | 234 | 317 | 496 |
JavaScript | 5 | 89 | 75 | 309 |
CSS | 13 | 25 | 23 | 141 |
SVG | 3 | 0 | 0 | 69 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
It is recommended to fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 85.69 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,907.00 |
Average method complexity | 4.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 49 | |
▷ Abstract classes | 2 | 4.08% |
▷ Concrete classes | 47 | 95.92% |
▷ Final classes | 0 | 0.00% |
Methods | 1,163 | |
▷ Static methods | 191 | 16.42% |
▷ Public methods | 805 | 69.22% |
▷ Protected methods | 15 | 1.29% |
▷ Private methods | 343 | 29.49% |
Functions | 150 | |
▷ Named functions | 148 | 98.67% |
▷ Anonymous functions | 2 | 1.33% |
Constants | 124 | |
▷ Global constants | 99 | 79.84% |
▷ Class constants | 25 | 20.16% |
▷ Public constants | 25 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/help_kcoupon.png | 0.85KB | 0.70KB | ▼ 17.03% |
img/kvoucherpro.png | 0.36KB | 0.33KB | ▼ 8.31% |
img/koboldsoft_black_solutions.png | 5.29KB | 4.04KB | ▼ 23.57% |
img/koboldcouponpro.png | 0.45KB | 0.46KB | 0.00% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |