Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲3.49MB] [CPU: ▼276.84ms] Passed 4 tests
This is a short check of server-side resources used by Giveaways for woocommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 7.32 ▲3.80 | 71.28 ▲22.19 |
Dashboard /wp-admin | 7.34 ▲3.93 | 53.19 ▲19.31 |
Posts /wp-admin/edit.php | 7.34 ▲3.69 | 53.92 ▲15.09 |
Add New Post /wp-admin/post-new.php | 9.52 ▲2.55 | 106.68 ▼1,161.89 |
Media Library /wp-admin/upload.php | 7.34 ▲4.04 | 43.58 ▲20.13 |
Freemius Debug [v.2.1.1] /wp-admin/admin.php?page=freemius | 7.34 | 38.44 |
Server storage [IO: ▲3.69MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 234 new files
Database: no new tables, 5 new options
New WordPress options |
---|
fs_debug_mode |
fs_accounts |
fs_gdpr |
fs_api_cache |
fs_active_plugins |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Giveaways for woocommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,828 ▲84 | 15.62 ▼0.06 | 6.09 ▼0.21 | 2.34 ▲0.07 |
Dashboard /wp-admin | 2,922 ▲64 | 6.13 ▼0.06 | 119.06 ▼18.83 | 173.20 ▲5.92 |
Posts /wp-admin/edit.php | 2,735 ▲44 | 3.24 ▼0.01 | 65.12 ▼0.10 | 158.20 ▲15.64 |
Add New Post /wp-admin/post-new.php | 1,793 ▲132 | 23.51 ▲7.39 | 419.05 ▼7.52 | 168.66 ▲12.49 |
Media Library /wp-admin/upload.php | 1,742 ▲47 | 5.50 ▼0.04 | 155.70 ▼4.55 | 212.82 ▲22.07 |
Freemius Debug [v.2.1.1] /wp-admin/admin.php?page=freemius | 1,459 | 2.46 | 55.09 | 131.72 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Zombie WordPress options detected upon uninstall: 5 options
- fs_active_plugins
- fs_gdpr
- fs_debug_mode
- fs_accounts
- fs_api_cache
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/giveaways-for-woocommerce/freemius/templates/ajax-loader.php
- 8× PHP files trigger server errors when accessed directly:
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/account/partials/addon.php on line 7
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/account/partials/addon.php on line 7
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/partials/network-activation.php:6
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/account/partials/addon.php:9
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/giveaways-for-woocommerce/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
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
5 plugin tags: woocommerce, coupon, giveaways, filter, purchases
giveaways-for-woocommerce/giveaways-for-woocommerce.php 92% from 13 tests
"Giveaways for woocommerce" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Requires at least: The required version number must match the one declared in readme.txt ("4.0.0" instead of "3.0")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected44,533 lines of code in 189 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 121 | 6,724 | 14,715 | 28,894 |
PO File | 9 | 4,216 | 4,944 | 9,156 |
Sass | 33 | 547 | 115 | 3,720 |
JavaScript | 9 | 352 | 668 | 2,426 |
Markdown | 1 | 61 | 0 | 192 |
CSS | 15 | 21 | 3 | 118 |
JSON | 1 | 0 | 0 | 27 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
Please tend to the following items
- Class cyclomatic complexity should be reduced to less than 1000 (currently 2,224)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.54 |
Average class complexity | 56.11 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,224.00 |
Average method complexity | 4.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 82.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 63 | |
▷ Abstract classes | 2 | 3.17% |
▷ Concrete classes | 61 | 96.83% |
▷ Final classes | 0 | 0.00% |
Methods | 1,141 | |
▷ Static methods | 229 | 20.07% |
▷ Public methods | 825 | 72.30% |
▷ Protected methods | 15 | 1.31% |
▷ Private methods | 301 | 26.38% |
Functions | 93 | |
▷ Named functions | 93 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 118 | |
▷ Global constants | 96 | 81.36% |
▷ Class constants | 22 | 18.64% |
▷ Public constants | 22 | 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
5 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/wc-dispatch-of-coupons-notices-user.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/giveaways-for-woocommerce.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
freemius/assets/img/wc-dispatch-of-coupons-notices-users.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |