Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.42MB] [CPU: ▼296.18ms] Passed 4 tests
Analyzing server-side resources used by Custom WooCommerce Checkout Fields Editor
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.90 ▲0.39 | 55.50 ▲3.43 |
Dashboard /wp-admin | 3.91 ▲0.50 | 36.99 ▲2.08 |
Posts /wp-admin/edit.php | 4.13 ▲0.49 | 39.21 ▲1.84 |
Add New Post /wp-admin/post-new.php | 7.37 ▲0.40 | 95.98 ▼1,190.76 |
Media Library /wp-admin/upload.php | 3.70 ▲0.40 | 26.33 ▲2.11 |
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius | 4.03 | 25.77 |
Server storage [IO: ▲3.61MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 192 new files
Database: no new tables, 4 new options
New WordPress options |
---|
fs_gdpr |
fs_accounts |
fs_debug_mode |
fs_active_plugins |
Browser metrics Passed 4 tests
A check of browser resources used by Custom WooCommerce Checkout Fields Editor
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,794 ▲72 | 15.70 ▲0.02 | 6.42 ▲0.27 | 2.04 ▼0.63 |
Dashboard /wp-admin | 2,919 ▲58 | 6.16 ▼0.06 | 116.73 ▼12.92 | 172.04 ▲12.72 |
Posts /wp-admin/edit.php | 2,716 ▲22 | 3.23 ▼0.00 | 62.92 ▼5.36 | 153.15 ▲9.57 |
Add New Post /wp-admin/post-new.php | 1,669 ▲8 | 16.21 ▲0.70 | 423.06 ▲5.79 | 154.73 ▼0.37 |
Media Library /wp-admin/upload.php | 1,728 ▲30 | 5.67 ▲0.16 | 144.47 ▲2.45 | 198.33 ▲17.13 |
Freemius Debug [v.2.4.1] /wp-admin/admin.php?page=freemius | 1,432 | 2.45 | 54.41 | 113.08 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/includes/class-freemius.php+8540
Undefined property: stdClass::$plugins
- This plugin did not uninstall successfully, leaving 4 options in the database
- fs_gdpr
- fs_accounts
- fs_active_plugins
- fs_debug_mode
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)
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
Please take a closer look at the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/ajax-loader.php
- 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function freemius() in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/partials/network-activation.php:6
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/account/partials/addon.php on line 6
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/account/partials/addon.php on line 8
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/account/partials/addon.php on line 7
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/account/partials/addon.php on line 6
- > PHP Fatal error
Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/account/partials/addon.php:9
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/account/partials/addon.php on line 7
- > PHP Notice
Undefined variable: VARS in wp-content/plugins/add-fields-to-checkout-page-woocommerce/freemius/templates/account/partials/addon.php on line 8
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Dashboard page for settings), #2 (Dashboard page for add new custom field), #3 (Thats how on front end your fields will look.)
add-fields-to-checkout-page-woocommerce/checkout-form-editor.php 77% from 13 tests
"Custom WooCommerce Checkout Fields Editor" version 1.2.5'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: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-fields-to-checkout-page-woocommerce.php" instead of "checkout-form-editor.php")
- Requires at least: The required version number must match the one declared in readme.txt ("4.5" instead of "3.0.0")
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected32,966 lines of code in 134 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 111 | 7,505 | 16,211 | 31,539 |
JavaScript | 6 | 164 | 64 | 605 |
PO File | 3 | 132 | 210 | 353 |
CSS | 12 | 23 | 3 | 228 |
Markdown | 1 | 68 | 0 | 214 |
JSON | 1 | 0 | 0 | 27 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,895)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 89.17 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,895.00 |
Average method complexity | 4.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 47 | |
▷ Abstract classes | 2 | 4.26% |
▷ Concrete classes | 45 | 95.74% |
▷ Final classes | 0 | 0.00% |
Methods | 1,162 | |
▷ Static methods | 176 | 15.15% |
▷ Public methods | 819 | 70.48% |
▷ Protected methods | 15 | 1.29% |
▷ Private methods | 328 | 28.23% |
Functions | 116 | |
▷ Named functions | 116 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 126 | |
▷ Global constants | 101 | 80.16% |
▷ Class constants | 25 | 19.84% |
▷ Public constants | 25 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.33MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
freemius/assets/img/add-fields-to-checkout-page-woocommerce.png | 14.05KB | 7.38KB | ▼ 47.45% |
assets/js/ajax-done.png | 3.73KB | 1.84KB | ▼ 50.60% |
assets/css/tick.png | 3.05KB | 0.27KB | ▼ 91.20% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
assets/css/upgrade-btn.png | 7.61KB | 2.20KB | ▼ 71.09% |