Benchmarks
Plugin footprint 83% 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: ▲0.52MB] [CPU: ▼290.69ms] Passed 4 tests
Server-side resources used by YITH WooCommerce Gift Cards
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.08 ▲0.57 | 68.60 ▼5.49 |
Dashboard /wp-admin | 3.91 ▲0.51 | 46.76 ▲10.25 |
Posts /wp-admin/edit.php | 4.20 ▲0.55 | 47.64 ▼8.84 |
Add New Post /wp-admin/post-new.php | 7.44 ▲0.47 | 109.53 ▼1,156.87 |
Media Library /wp-admin/upload.php | 3.85 ▲0.56 | 39.24 ▲8.46 |
Server storage [IO: ▲2.18MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 280 new files
Database: no new tables, 1 new option
New WordPress options |
---|
yit_recently_activated |
Browser metrics Passed 4 tests
Checking browser requirements for YITH WooCommerce Gift Cards
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,821 ▲67 | 16.03 ▲0.55 | 8.54 ▼8.93 | 3.92 ▲0.22 |
Dashboard /wp-admin | 2,924 ▲45 | 6.43 ▲0.00 | 190.77 ▼31.60 | 200.45 ▼31.11 |
Posts /wp-admin/edit.php | 2,695 ▲10 | 3.44 ▲0.02 | 83.44 ▼2.11 | 186.88 ▲8.54 |
Add New Post /wp-admin/post-new.php | 1,641 ▼49 | 18.95 ▼1.84 | 669.25 ▼0.19 | 200.21 ▼21.98 |
Media Library /wp-admin/upload.php | 1,705 ▲13 | 5.69 ▼0.04 | 188.59 ▲3.86 | 238.83 ▼13.91 |
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
Please fix the following items
- This plugin did not uninstall successfully, leaving 1 option in the database
- yit_recently_activated
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
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/yith-woocommerce-gift-cards/templates/status.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/yith-woocommerce-gift-cards/templates/status.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/yith-woocommerce-gift-cards/templates/admin/premium.php:183
- > PHP Notice
Undefined variable: sections in wp-content/plugins/yith-woocommerce-gift-cards/templates/status.php on line 11
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: woocommerce, gift, certificate, gift certificate, gift card
yith-woocommerce-gift-cards/init.php 77% from 13 tests
"YITH WooCommerce Gift Cards" version 2.8.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("yith-woocommerce-gift-cards.php" instead of "init.php")
- Description: The description should be shorter than 140 characters (currently 348 characters long)
- Requires at least: The required version number must match the one declared in readme.txt ("5.7" instead of "6.2")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin36,110 lines of code in 233 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 158 | 3,853 | 7,155 | 17,050 |
JavaScript | 50 | 1,363 | 872 | 9,150 |
CSS | 17 | 1,499 | 236 | 7,526 |
PO File | 4 | 847 | 1,041 | 2,326 |
XML | 1 | 11 | 9 | 35 |
SVG | 3 | 0 | 1 | 23 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 43.26 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 258.00 |
Average method complexity | 3.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 42.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 38 | |
▷ Abstract classes | 1 | 2.63% |
▷ Concrete classes | 37 | 97.37% |
▷ Final classes | 0 | 0.00% |
Methods | 548 | |
▷ Static methods | 57 | 10.40% |
▷ Public methods | 482 | 87.96% |
▷ Protected methods | 44 | 8.03% |
▷ Private methods | 22 | 4.01% |
Functions | 134 | |
▷ Named functions | 130 | 97.01% |
▷ Anonymous functions | 4 | 2.99% |
Constants | 82 | |
▷ Global constants | 34 | 41.46% |
▷ Class constants | 48 | 58.54% |
▷ Public constants | 48 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
32 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
plugin-fw/assets/css/jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png | 0.07KB | 0.08KB | 0.00% |
plugin-fw/assets/images/sidebar-right.png | 0.95KB | 0.11KB | ▼ 87.91% |
assets/images/choose-template-design.png | 0.36KB | 0.35KB | ▼ 4.58% |
plugin-fw/assets/css/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png | 0.09KB | 0.14KB | 0.00% |
plugin-fw/assets/css/jquery-ui/images/ui-icons_222222_256x240.png | 3.69KB | 4.18KB | 0.00% |