Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.07MB] [CPU: ▼5.84ms] Passed 4 tests
A check of server-side resources used by Voucherify
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.55 ▲0.08 | 41.22 ▼0.73 |
Dashboard /wp-admin | 3.39 ▲0.04 | 49.66 ▼8.34 |
Posts /wp-admin/edit.php | 3.50 ▲0.15 | 46.74 ▲1.50 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 84.57 ▼15.78 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 36.94 ▲1.67 |
Server storage [IO: ▲0.49MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 138 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
An overview of browser requirements for Voucherify
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲39 | 14.33 ▼0.04 | 1.73 ▲0.05 | 43.51 ▲7.73 |
Dashboard /wp-admin | 2,203 ▲28 | 5.57 ▼0.14 | 84.17 ▼13.97 | 37.13 ▼4.96 |
Posts /wp-admin/edit.php | 2,112 ▲30 | 2.02 ▲0.00 | 37.68 ▲2.57 | 34.51 ▼1.39 |
Add New Post /wp-admin/post-new.php | 1,537 ▲11 | 23.27 ▼0.05 | 654.71 ▲1.61 | 52.64 ▼0.31 |
Media Library /wp-admin/upload.php | 1,405 ▲5 | 4.20 ▲0.05 | 95.87 ▼0.51 | 40.50 ▼2.74 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 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
Please fix the following
- 49× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/voucherify/vendor/rspective/voucherify/test/PromotionsTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Voucherify\\Wordpress\\Common\\Services\\SessionService' not found in wp-content/plugins/voucherify/src/Voucherify/Wordpress/Handlers/GiftCards/GiftCardsSessionService.php:7
- > PHP Fatal error
Uncaught Error: Class 'Voucherify\\Wordpress\\Common\\Services\\CartService' not found in wp-content/plugins/voucherify/src/Voucherify/Wordpress/Handlers/GiftCards/GiftCardCartService.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/voucherify/vendor/rspective/voucherify/test/ClientTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/voucherify/vendor/rspective/voucherify/test/VouchersTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Voucherify\\Wordpress\\Common\\Models\\Voucher' not found in wp-content/plugins/voucherify/src/Voucherify/Wordpress/Handlers/Promotions/PromotionVoucher.php:7
- > PHP Notice
Undefined variable: code in wp-content/plugins/voucherify/partials/cart-discount-voucher.php on line 4
- > PHP Fatal error
Uncaught Error: Class 'Voucherify\\Wordpress\\Common\\Services\\ValidationService' not found in wp-content/plugins/voucherify/src/Voucherify/Wordpress/Handlers/DiscountVouchers/DiscountVoucherValidationService.php:28
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/voucherify/vendor/rspective/voucherify/test/ValidationRulesTest.php:8
- > PHP Fatal error
Uncaught Error: Class 'Voucherify\\Wordpress\\Common\\Models\\Voucher' not found in wp-content/plugins/voucherify/src/Voucherify/Wordpress/Handlers/DiscountVouchers/DiscountVoucher.php:8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration Passed 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: integration, voucherify, rspective, api, woocommerce
voucherify/voucherify.php Passed 13 tests
"Voucherify" version 3.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
79 characters long description:
Integrates Voucherify API with woocommerce replacing core coupons functionality
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
Everything looks great! No dangerous files found in this plugin8,890 lines of code in 128 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 117 | 1,956 | 2,137 | 7,724 |
Markdown | 2 | 157 | 0 | 723 |
PO File | 2 | 69 | 73 | 188 |
JSON | 3 | 0 | 0 | 87 |
JavaScript | 1 | 15 | 0 | 82 |
CSS | 2 | 13 | 1 | 67 |
XML | 1 | 0 | 0 | 19 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.20 |
Average class complexity | 5.87 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 47.00 |
Average method complexity | 1.71 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 14 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 98 | |
▷ Abstract classes | 7 | 7.14% |
▷ Concrete classes | 91 | 92.86% |
▷ Final classes | 0 | 0.00% |
Methods | 617 | |
▷ Static methods | 62 | 10.05% |
▷ Public methods | 534 | 86.55% |
▷ Protected methods | 29 | 4.70% |
▷ Private methods | 54 | 8.75% |
Functions | 31 | |
▷ Named functions | 16 | 51.61% |
▷ Anonymous functions | 15 | 48.39% |
Constants | 9 | |
▷ Global constants | 4 | 44.44% |
▷ Class constants | 5 | 55.56% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/rspective/voucherify/docs/images/voucherify-php-sdk.png | 42.99KB | 11.62KB | ▼ 72.98% |