Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.96ms] Passed 4 tests
An overview of server-side resources used by WooCommerce Cost of Shipping
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.11 ▼1.76 |
Dashboard /wp-admin | 3.31 ▲0.00 | 46.67 ▲1.20 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 47.98 ▼1.05 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 81.90 ▼14.22 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 39.03 ▲5.01 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Cost of Shipping
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.27 ▲0.04 | 1.65 ▲0.08 | 38.09 ▼5.03 |
Dashboard /wp-admin | 2,192 ▲15 | 5.54 ▼0.12 | 83.54 ▼2.20 | 36.57 ▼5.17 |
Posts /wp-admin/edit.php | 2,100 ▲3 | 2.00 ▲0.05 | 39.01 ▲5.54 | 35.02 ▼4.04 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.22 ▲0.16 | 647.58 ▼29.71 | 58.14 ▲3.26 |
Media Library /wp-admin/upload.php | 1,403 ▲9 | 4.18 ▼0.11 | 98.28 ▲1.31 | 42.42 ▼1.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
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 fix the following
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-cost-of-shipping/woocommerce-cost-of-shipping.php:344
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: woocommerce, cost of shipping, shipping cost, net profit, shipstation
woo-cost-of-shipping/woocommerce-cost-of-shipping.php 77% from 13 tests
This is the main PHP file of "WooCommerce Cost of Shipping" version 1.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-cost-of-shipping.php" instead of "woocommerce-cost-of-shipping.php")
- Requires at least: Required version does not match the one declared in readme.txt ("4.8.1" instead of "3.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin934 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 256 | 657 | 872 |
CSS | 1 | 7 | 10 | 44 |
Markdown | 3 | 3 | 0 | 15 |
JavaScript | 2 | 0 | 0 | 2 |
JSON | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 19.25 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 62.00 |
Average method complexity | 3.32 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 1 | 12.50% |
Methods | 64 | |
▷ Static methods | 7 | 10.94% |
▷ Public methods | 59 | 92.19% |
▷ Protected methods | 3 | 4.69% |
▷ Private methods | 2 | 3.12% |
Functions | 5 | |
▷ Named functions | 4 | 80.00% |
▷ Anonymous functions | 1 | 20.00% |
Constants | 2 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 2 | 100.00% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected