Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.20MB] [CPU: ▼4.89ms] Passed 4 tests
This is a short check of server-side resources used by WooCommerce Multiple Free Gift
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.63 ▲0.17 | 30.29 ▼7.34 |
Dashboard /wp-admin | 3.50 ▲0.20 | 47.54 ▲1.04 |
Posts /wp-admin/edit.php | 3.62 ▲0.26 | 44.50 ▼6.30 |
Add New Post /wp-admin/post-new.php | 6.10 ▲0.22 | 87.34 ▼6.96 |
Media Library /wp-admin/upload.php | 3.43 ▲0.20 | 35.37 ▲1.11 |
Woo Free Gift /wp-admin/admin.php?page=woocommerce-multiple-free-gift | 3.41 | 33.19 |
General Settings /wp-admin/admin.php?page=woocommerce-multiple-free-gift-settings | 3.41 | 34.03 |
Gift Criteria /wp-admin/admin.php?page=woocommerce-multiple-free-gift-criteria | 3.41 | 31.03 |
Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 12 new options
New WordPress options |
---|
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
_wfg_popup_add_gift_text |
_wfg_popup_cancel_text |
recovery_mode_email_last_sent |
_wfg_popup_heading |
widget_recent-comments |
db_upgraded |
_wfg_invalid_condition_text |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WooCommerce Multiple Free Gift
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,605 ▼166 | 13.92 ▼0.39 | 6.48 ▲4.70 | 36.85 ▼4.86 |
Dashboard /wp-admin | 2,252 ▲64 | 5.23 ▼0.58 | 104.90 ▲4.68 | 37.66 ▼5.36 |
Posts /wp-admin/edit.php | 2,141 ▲49 | 2.20 ▲0.18 | 37.31 ▼7.25 | 32.36 ▼4.29 |
Add New Post /wp-admin/post-new.php | 1,553 ▲7 | 23.48 ▲5.45 | 674.31 ▲85.24 | 74.60 ▲20.54 |
Media Library /wp-admin/upload.php | 1,428 ▲40 | 4.55 ▲0.38 | 99.46 ▼1.76 | 43.40 ▼4.39 |
Woo Free Gift /wp-admin/admin.php?page=woocommerce-multiple-free-gift | 754 | 1.78 | 9.84 | 21.33 |
General Settings /wp-admin/admin.php?page=woocommerce-multiple-free-gift-settings | 962 | 2.17 | 27.89 | 32.41 |
Gift Criteria /wp-admin/admin.php?page=woocommerce-multiple-free-gift-criteria | 944 | 2.07 | 31.36 | 27.24 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- Zombie WordPress options were found after uninstall: 7 options
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- recovery_mode_email_last_sent
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- > GET request to /wp-admin/admin.php?page=woocommerce-multiple-free-gift
- > Error in wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/pages/main_menu_page.php+116
Uncaught Error: Call to undefined function woocommerce_get_page_id() in wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/pages/main_menu_page.php:116
Stack trace:
#0 wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/WFG_Admin.class.php(180): include()
#1 wp-includes/class-wp-hook.php(310): WFG_Admin->main_menu_template()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/pages/gift_criteria.php:5
- > PHP Fatal error
Uncaught Error: Class 'WFG_Settings_Helper' not found in wp-content/plugins/woocommerce-multiple-free-gift/templates/default/template-default.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/pages/main_menu_page.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/pages/general_settings.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/WFG_Admin.class.php:23
- > PHP Fatal error
Uncaught Error: Class 'WFG_Settings_Helper' not found in wp-content/plugins/woocommerce-multiple-free-gift/lib/WFG_Frontend.class.php:42
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-multiple-free-gift/lib/admin/WFG_Single_Gift.class.php:22
- > 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)
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: woocommerce multiple free gifts, woocommerce prizes, woocommerce plugin, woocommerce gift management, woocommerce multiple gifts...
woocommerce-multiple-free-gift/woocommerce-multiple-free-gift.php Passed 13 tests
The main file in "WooCommerce Multiple Free Gift" v. 1.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
31 characters long description:
WooCommerce giveaway made easy.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin2,466 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 238 | 710 | 1,417 |
CSS | 4 | 98 | 40 | 874 |
PO File | 1 | 33 | 0 | 85 |
JavaScript | 3 | 12 | 24 | 84 |
SVG | 1 | 0 | 1 | 6 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 20.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 54.00 |
Average method complexity | 3.35 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 66 | |
▷ Static methods | 29 | 43.94% |
▷ Public methods | 51 | 77.27% |
▷ Protected methods | 5 | 7.58% |
▷ Private methods | 10 | 15.15% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 3 | 60.00% |
▷ Class constants | 2 | 40.00% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/admin/img/default_cat.png | 18.80KB | 0.81KB | ▼ 95.69% |
lib/admin/img/ddown.png | 0.18KB | 0.13KB | ▼ 29.89% |
lib/admin/img/wfg-logo.png | 0.99KB | 0.63KB | ▼ 36.09% |