Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼5.58ms] Passed 4 tests
A check of server-side resources used by WooCommerce Sales by Country
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.01 | 38.62 ▼5.09 |
Dashboard /wp-admin | 3.31 ▲0.00 | 42.05 ▼5.90 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 47.69 ▲0.70 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 88.65 ▼9.37 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.06 ▼1.95 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
WooCommerce Sales by Country: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲43 | 13.31 ▼1.06 | 1.73 ▼0.23 | 41.41 ▼3.23 |
Dashboard /wp-admin | 2,206 ▲18 | 4.83 ▼0.16 | 111.63 ▼7.51 | 40.24 ▼7.86 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 2.01 ▼0.03 | 39.70 ▼0.39 | 34.19 ▼0.69 |
Add New Post /wp-admin/post-new.php | 1,529 ▲9 | 18.28 ▼4.98 | 601.91 ▼62.30 | 54.99 ▲2.54 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.17 ▼0.01 | 96.19 ▼8.22 | 42.32 ▼0.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- db_upgraded
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 3× PHP files trigger server errors when accessed directly:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/woocommerce-sales-by-country/sales-by-country.php on line 33
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-sales-by-country/sales-by-country.php on line 33
- > PHP Warning
require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-sales-by-country/sales-by-country.php on line 33
- > PHP Warning
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
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: sales, report, woocommerce, country
woocommerce-sales-by-country/sales-by-country.php 92% from 13 tests
The principal PHP file in "WooCommerce Sales by Country" v. 1.5 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-sales-by-country.php" instead of "sales-by-country.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected148 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 51 | 104 | 128 |
JavaScript | 1 | 0 | 0 | 20 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 2.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 2.00 |
Average method complexity | 1.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 2.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
There were not PNG files found in your plugin