Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼0.02MB] [CPU: ▼311.86ms] Passed 4 tests
This is a short check of server-side resources used by Gift Products For Woocommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.01 | 65.10 ▼12.98 |
Dashboard /wp-admin | 3.41 ▲0.00 | 34.11 ▼6.64 |
Posts /wp-admin/edit.php | 3.64 ▼0.00 | 40.11 ▼13.26 |
Add New Post /wp-admin/post-new.php | 6.88 ▼0.09 | 103.21 ▼1,214.55 |
Media Library /wp-admin/upload.php | 3.30 ▲0.00 | 38.94 ▲4.49 |
Server storage [IO: ▲0.36MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Gift Products For Woocommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,890 ▲145 | 16.13 ▲0.64 | 7.77 ▼0.59 | 3.06 ▼0.83 |
Dashboard /wp-admin | 2,958 ▲39 | 6.46 ▲0.09 | 191.87 ▼20.36 | 195.06 ▼26.63 |
Posts /wp-admin/edit.php | 2,724 ▲6 | 3.44 ▲0.01 | 88.35 ▼16.02 | 168.43 ▼36.62 |
Add New Post /wp-admin/post-new.php | 1,662 ▲19 | 17.10 ▼3.79 | 660.68 ▲29.22 | 197.98 ▼8.35 |
Media Library /wp-admin/upload.php | 1,730 ▼0 | 5.74 ▲0.04 | 190.49 ▼5.65 | 249.06 ▼0.95 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
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
The following issues need your attention
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/gift-products-for-woocommerce/woo-product-gift.php
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Contributors: Plugin contributors not specified
- Screenshots: Add descriptions for screenshots #1, #10, #11, #12, #13, #14, #2, #3, #4, #5, #6, #7, #8, #9 in gift-products-for-woocommerce/assets to your readme.txt
gift-products-for-woocommerce/woo-product-gift.php 85% from 13 tests
The main file in "Gift Products For Woocommerce" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gift-products-for-woocommerce.php" instead of "woo-product-gift.php")
- Domain Path: The domain path is invalid: folder "/languages" does not exist
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected4,711 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 589 | 1,115 | 2,550 |
PHP | 3 | 370 | 32 | 1,535 |
CSS | 8 | 26 | 63 | 625 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 75.00 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 145.00 |
Average method complexity | 7.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 33.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 37 | |
▷ Static methods | 4 | 10.81% |
▷ Public methods | 37 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
8 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/images/plus-circular-button.png | 0.94KB | 0.69KB | ▼ 26.59% |
includes/images/review.png | 15.87KB | 11.90KB | ▼ 25.01% |
includes/images/support.png | 6.44KB | 5.59KB | ▼ 13.09% |
includes/images/minus.png | 0.61KB | 0.37KB | ▼ 40.19% |
includes/images/minus_1.png | 0.91KB | 0.67KB | ▼ 27.06% |