Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.21MB] [CPU: ▼3.80ms] Passed 4 tests
Analyzing server-side resources used by Gift Pack for Woocommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.70 ▲0.24 | 44.93 ▲1.57 |
Dashboard /wp-admin | 3.52 ▲0.17 | 50.67 ▼12.58 |
Posts /wp-admin/edit.php | 3.63 ▲0.27 | 55.00 ▲5.11 |
Add New Post /wp-admin/post-new.php | 6.10 ▲0.21 | 94.41 ▼9.31 |
Media Library /wp-admin/upload.php | 3.44 ▲0.21 | 40.41 ▲8.07 |
Server storage [IO: ▲0.32MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for Gift Pack for Woocommerce
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,900 ▲153 | 13.36 ▼1.35 | 8.72 ▲7.00 | 44.85 ▲0.39 |
Dashboard /wp-admin | 2,213 ▲39 | 5.59 ▲0.01 | 90.56 ▲3.56 | 41.09 ▲1.54 |
Posts /wp-admin/edit.php | 2,124 ▲24 | 2.00 ▲0.07 | 40.78 ▲2.36 | 37.50 ▲1.72 |
Add New Post /wp-admin/post-new.php | 1,544 ▲9 | 23.25 ▲4.86 | 579.62 ▼68.31 | 49.83 ▼15.69 |
Media Library /wp-admin/upload.php | 1,418 ▲15 | 4.13 ▼0.06 | 95.32 ▼0.78 | 43.31 ▲0.09 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Zombie WordPress options were found after uninstall: 6 options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
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
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
Please take a closer look at the following
- 6× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'Gift_Pack_For_Woocommerce' not found in wp-content/plugins/gift-pack-for-woocommerce/public/partials/gift-pack-for-woocommerce-public-display.php:16
- > PHP Fatal error
Uncaught Error: Class 'Gift_Pack_For_Woocommerce' not found in wp-content/plugins/gift-pack-for-woocommerce/admin/partials/gift-pack-html.php:3
- > PHP Fatal error
Uncaught Error: Class 'Gift_Pack_For_Woocommerce' not found in wp-content/plugins/gift-pack-for-woocommerce/admin/partials/gift-pack-for-woocommerce-public-display.php:16
- > PHP Fatal error
Uncaught Error: Class 'Gift_Pack_For_Woocommerce' not found in wp-content/plugins/gift-pack-for-woocommerce/public/partials/gift-pack-html.php:3
- > PHP Fatal error
Uncaught Error: Class 'Gift_Pack_For_Woocommerce' not found in wp-content/plugins/gift-pack-for-woocommerce/admin/partials/gift-pack-for-woocommerce-admin-display.php:14
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/gift-pack-for-woocommerce/public/partials/gift-pack-data-in-order.php:17
- > PHP Fatal error
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)
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: gift wrapper, gift wrap, gift, gift pack, woocommmerce...
gift-pack-for-woocommerce/gift-pack-for-woocommerce.php Passed 13 tests
The main PHP script in "Gift Pack for Woocommerce" version 1.1.2 is automatically included on every request by WordPress
80 characters long description:
Allow customers add gift pack/wrapping to individual products from product pages
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,224 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 326 | 599 | 1,627 |
JavaScript | 4 | 61 | 77 | 356 |
CSS | 2 | 3 | 8 | 241 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 22.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 102.00 |
Average method complexity | 4.42 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 97.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 43 | |
▷ Static methods | 4 | 9.30% |
▷ Public methods | 38 | 88.37% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 11.63% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
5 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/yellow_gift_pack.png | 35.30KB | 13.31KB | ▼ 62.30% |
public/images/default_gift.png | 2.69KB | 2.73KB | 0.00% |
public/images/green_gift_pack.png | 37.52KB | 13.35KB | ▼ 64.41% |
public/images/blue_gift_pack.png | 41.49KB | 15.11KB | ▼ 63.58% |
public/images/pink_gift_pack.png | 37.24KB | 13.88KB | ▼ 62.72% |