Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲5.05MB] [CPU: ▲21.95ms] 75% from 4 tests
Analyzing server-side resources used by WooCommerce Country Catalogs - Product Country Restrictions
Please fix the following
- Extra RAM: Extra memory usage should kept under 5MB (currently 5.05MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.93 ▲5.47 | 55.24 ▲16.18 |
Dashboard /wp-admin | 8.95 ▲5.64 | 74.55 ▲23.92 |
Posts /wp-admin/edit.php | 8.95 ▲5.59 | 78.55 ▲30.17 |
Add New Post /wp-admin/post-new.php | 9.38 ▲3.49 | 113.78 ▲17.52 |
Media Library /wp-admin/upload.php | 8.95 ▲5.72 | 69.17 ▲33.26 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 8.95 | 59.87 |
Server storage [IO: ▲3.22MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 202 new files
Database: no new tables, 10 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
fs_accounts |
widget_recent-posts |
widget_recent-comments |
fs_active_plugins |
can_compress_scripts |
db_upgraded |
fs_debug_mode |
wcacr_welcome_redirect |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WooCommerce Country Catalogs - Product Country Restrictions
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,516 ▼219 | 14.47 ▼0.27 | 0.83 ▼0.93 | 4.54 ▼42.90 |
Dashboard /wp-admin | 2,240 ▲52 | 4.83 ▼0.05 | 108.16 ▲4.42 | 40.14 ▲0.34 |
Posts /wp-admin/edit.php | 2,123 ▲34 | 2.00 ▼0.00 | 35.35 ▼4.76 | 32.37 ▼4.63 |
Add New Post /wp-admin/post-new.php | 1,532 ▲9 | 17.39 ▼5.80 | 653.14 ▲14.21 | 64.51 ▲8.10 |
Media Library /wp-admin/upload.php | 1,425 ▲34 | 4.15 ▼0.09 | 98.75 ▼0.55 | 46.25 ▲3.52 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,097 | 1.85 | 27.26 | 27.98 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/woo-country-restrictions-advanced/vendor/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- This plugin does not fully uninstall, leaving 10 options in the database
- widget_recent-comments
- fs_debug_mode
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- fs_active_plugins
- fs_accounts
- wcacr_welcome_redirect
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
Almost there! Just fix the following items
- 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
require_once(WCACR_DIST_DIR/vendor/freemius/start.php): failed to open stream: No such file or directory in wp-content/plugins/woo-country-restrictions-advanced/inc/freemius-init.php on line 16
- > PHP Warning
include(WCACR_DIST_DIR/views/action-buttons.php): failed to open stream: No such file or directory in wp-content/plugins/woo-country-restrictions-advanced/views/welcome-page-content.php on line 3
- > PHP Warning
Use of undefined constant WCACR_DIST_DIR - assumed 'WCACR_DIST_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-country-restrictions-advanced/inc/freemius-init.php on line 16
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-country-restrictions-advanced/modules/core/frontend/product-frontend-functions.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-country-restrictions-advanced/integrations/wp-sheet-editor.php:189
- > PHP Fatal error
Uncaught Error: Call to undefined function WCACR() in wp-content/plugins/woo-country-restrictions-advanced/views/action-buttons.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/woo-country-restrictions-advanced/vendor/vg-plugin-sdk/views/page-template.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-country-restrictions-advanced/modules/core/index.php:29
- > PHP Fatal error
require_once(): Failed opening required 'WCACR_DIST_DIR/vendor/freemius/start.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-country-restrictions-advanced/inc/freemius-init.php on line 16
- > PHP Warning
include(): Failed opening 'WCACR_DIST_DIR/views/action-buttons.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/woo-country-restrictions-advanced/views/welcome-page-content.php on line 3
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration 93% from 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
3 plugin tags: geolocalization, country restrictions, woocommerce
woo-country-restrictions-advanced/advanced-country-restrictions.php 85% from 13 tests
The primary PHP file in "WooCommerce Country Catalogs - Product Country Restrictions" version 1.14.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Requires at least: Required version must be the same as the one declared in readme.txt ("3.6" instead of "4.0")
- Main file name: The principal plugin file should be the same as the plugin slug ("woo-country-restrictions-advanced.php" instead of "advanced-country-restrictions.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected34,998 lines of code in 152 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 134 | 8,363 | 17,327 | 34,725 |
JavaScript | 3 | 34 | 59 | 194 |
CSS | 14 | 6 | 0 | 61 |
XML | 1 | 0 | 0 | 18 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 87.65 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 52 | |
▷ Abstract classes | 2 | 3.85% |
▷ Concrete classes | 50 | 96.15% |
▷ Final classes | 0 | 0.00% |
Methods | 1,302 | |
▷ Static methods | 200 | 15.36% |
▷ Public methods | 910 | 69.89% |
▷ Protected methods | 17 | 1.31% |
▷ Private methods | 375 | 28.80% |
Functions | 144 | |
▷ Named functions | 144 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 155 | |
▷ Global constants | 108 | 69.68% |
▷ Class constants | 47 | 30.32% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
vendor/freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |