Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
- Install procedure had errors
- > Warning in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-logs.php+20
scandir(wp-content/uploads/cargo-shipping-location): failed to open dir: No such file or directory
Server metrics [RAM: ▼1.65MB] [CPU: ▼49.00ms] Passed 4 tests
This is a short check of server-side resources used by Cargo Shipping Location for WooCommerce
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.40 ▼1.07 | 7.03 ▼30.86 |
Dashboard /wp-admin | 2.34 ▼0.96 | 10.15 ▼48.19 |
Posts /wp-admin/edit.php | 2.34 ▼1.02 | 11.05 ▼37.41 |
Add New Post /wp-admin/post-new.php | 2.34 ▼3.55 | 8.96 ▼79.54 |
Media Library /wp-admin/upload.php | 2.34 ▼0.89 | 9.89 ▼23.72 |
Orders Reindex /wp-admin/admin.php?page=cargo_orders_reindex | 2.34 | 11.60 |
Log Files /wp-admin/admin.php?page=cargo_shipping_log | 2.34 | 9.14 |
Cargo Shipping Location /wp-admin/admin.php?page=loaction_api_settings | 2.34 | 10.87 |
Contact Us /wp-admin/admin.php?page=cargo_shipping_contact | 2.34 | 8.95 |
Server storage [IO: ▲4.12MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 71 new files
Database: no new tables, 7 new options
New WordPress options |
---|
recovery_mode_email_last_sent |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Cargo Shipping Location for WooCommerce
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,524 ▼238 | 14.30 ▼0.05 | 0.67 ▼0.91 | 17.98 ▼26.24 |
Dashboard /wp-admin | 2,250 ▲73 | 5.62 ▼0.02 | 97.64 ▲5.34 | 81.08 ▲38.83 |
Posts /wp-admin/edit.php | 920 ▼1,180 | 1.12 ▼0.86 | 8.39 ▼29.92 | 22.15 ▼16.77 |
Add New Post /wp-admin/post-new.php | 1,587 ▲61 | 23.10 ▼0.11 | 766.72 ▲74.09 | 51.79 ▼5.70 |
Media Library /wp-admin/upload.php | 1,461 ▲61 | 4.19 ▼0.05 | 93.80 ▼6.86 | 74.06 ▲31.99 |
Orders Reindex /wp-admin/admin.php?page=cargo_orders_reindex | 727 | 1.12 | 7.96 | 19.43 |
Log Files /wp-admin/admin.php?page=cargo_shipping_log | 727 | 1.51 | 6.47 | 21.50 |
Cargo Shipping Location /wp-admin/admin.php?page=loaction_api_settings | 727 | 1.12 | 7.45 | 21.88 |
Contact Us /wp-admin/admin.php?page=cargo_shipping_contact | 985 | 2.19 | 34.86 | 25.20 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- The plugin did not uninstall gracefully
- > Warning in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-logs.php+20
scandir(wp-content/uploads/cargo-shipping-location): failed to open dir: No such file or directory
- The uninstall procedure has failed, leaving 7 options in the database
- widget_recent-posts
- db_upgraded
- recovery_mode_email_last_sent
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 25% 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
- 16 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=cargo_shipping_contact
- > Warning in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-logs.php+20
scandir(wp-content/uploads/cargo-shipping-location): failed to open dir: No such file or directory
- 16 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=cargo_shipping_contact
- > Warning in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-logs.php+20
scandir(): (errno 2): No such file or directory
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 fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/cargo-shipping-location-for-woocommerce/templates/old_plugin_reindex.php
- 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cargo-shipping-location-for-woocommerce/templates/checkout-popups.php:2
- > PHP Fatal error
require(): Failed opening required 'CSLFW_PATH/includes/cslfw-helpers.php' (include_path='.:/usr/share/php') in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-cargo.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/woo-baldarp-shipping.php:3
- > PHP Warning
Use of undefined constant CSLFW_PATH - assumed 'CSLFW_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-admin.php on line 9
- > PHP Fatal error
Uncaught Error: Class 'CSLFW_Helpers' not found in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-front.php:15
- > PHP Warning
require(CSLFW_PATH/includes/cslfw-cargo.php): failed to open stream: No such file or directory in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-admin.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/cargo-shipping-location-for-woocommerce/templates/settings.php:2
- > PHP Warning
Use of undefined constant CSLFW_PATH - assumed 'CSLFW_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-cargo.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'CSLFW_Helpers' not found in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/cslfw-settings.php:15
- > PHP Fatal error
Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/cargo-shipping-location-for-woocommerce/includes/woo-baldarp-express-shipping.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: delivery, woo-commerce, woocommerce, cargo, shipment
cargo-shipping-location-for-woocommerce/cargo-shipping-location.php 92% from 13 tests
The primary PHP file in "Cargo Shipping Location for WooCommerce" version 3.8 is used by WordPress to initiate all plugin 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 ("cargo-shipping-location-for-woocommerce.php" instead of "cargo-shipping-location.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected4,007 lines of code in 55 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 19 | 323 | 284 | 2,461 |
JavaScript | 9 | 67 | 49 | 892 |
CSS | 4 | 44 | 18 | 516 |
SVG | 23 | 0 | 0 | 138 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.50 |
Average class complexity | 30.55 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 116.00 |
Average method complexity | 4.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 53.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 91 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 91 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 1.14MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/image/order-closed-img.png | 25.88KB | 11.15KB | ▼ 56.91% |
assets/image/default_new.png | 1.85KB | 1.49KB | ▼ 19.81% |
assets/image/dummy-img-3.png | 30.50KB | 13.67KB | ▼ 55.17% |
assets/image/dummy-img-2.png | 33.10KB | 14.50KB | ▼ 56.19% |
assets/image/default-marker.png | 8.58KB | 4.04KB | ▼ 52.89% |