Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▼1.87MB] [CPU: ▼53.95ms] Passed 4 tests
Analyzing server-side resources used by Add Region by Country for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.12 ▼1.34 | 7.39 ▼33.36 |
Dashboard /wp-admin | 2.14 ▼1.16 | 7.20 ▼57.04 |
Posts /wp-admin/edit.php | 2.14 ▼1.21 | 7.20 ▼44.83 |
Add New Post /wp-admin/post-new.php | 2.14 ▼3.75 | 8.17 ▼80.58 |
Media Library /wp-admin/upload.php | 2.14 ▼1.08 | 7.84 ▼26.76 |
Add Region /wp-admin/admin.php?page=arbyw-region-by-country-page | 2.14 | 8.15 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_woocommerce_custom_region_by_country |
New WordPress options |
---|
widget_recent-posts |
WC_CMETRIC_ARBYW_DB_VERSION |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
recovery_mode_email_last_sent |
Browser metrics Passed 4 tests
A check of browser resources used by Add Region by Country for WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,828 ▲67 | 14.74 ▲0.36 | 1.73 ▲0.02 | 47.55 ▲5.33 |
Dashboard /wp-admin | 2,231 ▲28 | 5.81 ▲0.95 | 96.41 ▼17.75 | 39.33 ▲0.64 |
Posts /wp-admin/edit.php | 2,113 ▲13 | 2.04 ▼0.01 | 37.03 ▼4.94 | 36.86 ▼2.53 |
Add New Post /wp-admin/post-new.php | 1,539 ▲13 | 17.67 ▲0.20 | 680.80 ▲5.59 | 50.68 ▲5.85 |
Media Library /wp-admin/upload.php | 1,416 ▲16 | 4.14 ▼0.09 | 112.29 ▲13.10 | 53.79 ▲6.27 |
Add Region /wp-admin/admin.php?page=arbyw-region-by-country-page | 733 | 1.53 | 8.32 | 32.67 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/add-region-by-country-for-woocommerce/cmetric_arbyw_class.php+70
Undefined index: activate
- Zombie tables detected upon uninstall: 1 table
- wp_woocommerce_custom_region_by_country
- Zombie WordPress options were found after uninstall: 8 options
- WC_CMETRIC_ARBYW_DB_VERSION
- theysaidso_admin_options
- recovery_mode_email_last_sent
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=arbyw-region-by-country-page
- > Notice in wp-content/plugins/add-region-by-country-for-woocommerce/cmetric_arbyw_class.php+70
Undefined index: activate
- > GET request to /wp-admin/admin.php?page=arbyw-region-by-country-page
- > Error in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/region_country_page.php+116
Uncaught Error: Class 'WC_Countries' not found in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/region_country_page.php:116
Stack trace:
#0 wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/region_country_page.php(55): region_build_form()
#1 wp-content/plugins/add-region-by-country-for-woocommerce/includes/cmetric_arbyw_setting_functions.php(52): include('/var/www/wordpr...')
#2 wp-includes/class-wp-hook.php(310): WP_Class_Cmetric_Arbyw_Setting->arbyw_region_by_country_page_callback()
#3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#4 wp-includes/plugin.php(517): WP_Hook->do_action()
#5 wp-admin/admin.php(259): do_action()
#6 {main}
thrown
SRP 50% 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 take a closer look at the following
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/region_country_page.php:2
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/class-region-list-table.php on line 4
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/class-region-list-table.php on line 4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/class-region-list-table.php on line 4
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/class-region-list-table.php on line 4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/class-region-list-table.php on line 4
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/add-region-by-country-for-woocommerce/includes/views/class-region-list-table.php on line 4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 81% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
- License uri: Please fix this invalid url: ""
- Donate link: Please fix this invalid url: ""
add-region-by-country-for-woocommerce/add-region-by-country-for-woocommerce.php 92% from 13 tests
The main PHP file in "Add Region by Country for WooCommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin466 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 22 | 54 | 463 |
CSS | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 11.33 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 19.00 |
Average method complexity | 1.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.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 | 28 | |
▷ Static methods | 3 | 10.71% |
▷ Public methods | 25 | 89.29% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 10.71% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 5 | 83.33% |
▷ Class constants | 1 | 16.67% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin