Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼1.59ms] Passed 4 tests
An overview of server-side resources used by ELEX WooCommerce Australia Post Shipping
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 40.64 ▼1.72 |
Dashboard /wp-admin | 3.31 ▲0.00 | 45.00 ▼1.24 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.90 ▼1.37 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 91.37 ▲5.04 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 35.21 ▼2.02 |
Server storage [IO: ▲1.19MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
ELEX WooCommerce Australia Post Shipping: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲43 | 13.20 ▼1.11 | 1.75 ▲0.09 | 45.48 ▼2.17 |
Dashboard /wp-admin | 2,209 ▲24 | 5.84 ▼0.02 | 97.67 ▼2.72 | 41.56 ▲5.47 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.04 ▲0.06 | 40.32 ▲3.48 | 33.68 ▲1.67 |
Add New Post /wp-admin/post-new.php | 1,514 ▼5 | 17.90 ▼4.99 | 638.92 ▼2.76 | 56.95 ▼2.22 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.17 ▼0.07 | 96.82 ▼15.47 | 42.77 ▼11.24 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP 0% 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
The following issues need your attention
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/elex-australia-post-shipping/review_and_troubleshoot_notify/resources/logo.php
- 10× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-australia-post-shipping/includes/market.php:86
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elex-australia-post-shipping/australia-post-deprecated-functions.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-australia-post-shipping/review_and_troubleshoot_notify/resources/review.php:58
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/elex-australia-post-shipping/australia-post-woocommerce-shipping.php:28
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/elex-australia-post-shipping/includes/class-elex-australia-post-functions.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-australia-post-shipping/review_and_troubleshoot_notify/resources/troubleshoot.php:59
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elex-australia-post-shipping/includes/data-elex-default-values.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-australia-post-shipping/includes/settings/wf_html_services.php:43
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elex-australia-post-shipping/includes/settings/aus_general_settings.php:25
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/elex-australia-post-shipping/includes/settings/aus_rates_settings.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
- Donate link: Please fix this invalid URI: ""
elex-australia-post-shipping/australia-post-woocommerce-shipping.php 77% from 13 tests
The main PHP file in "ELEX WooCommerce Australia Post Shipping" ver. 3.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "2.6")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("elex-australia-post-shipping.php" instead of "australia-post-woocommerce-shipping.php")
Code Analysis 97% from 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
There were no executable files found in this plugin11,861 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 1 | 1,709 | 21 | 9,102 |
PHP | 14 | 384 | 229 | 2,709 |
JavaScript | 2 | 9 | 2 | 50 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
The following items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 124)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.57 |
Average class complexity | 47.71 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 237.00 |
Average method complexity | 6.74 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 124.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 57 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 41 | 71.93% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 16 | 28.07% |
Functions | 33 | |
▷ Named functions | 32 | 96.97% |
▷ Anonymous functions | 1 | 3.03% |
Constants | 6 | |
▷ Global constants | 4 | 66.67% |
▷ Class constants | 2 | 33.33% |
▷ Public constants | 2 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.84MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/EasyPost_shipping.png | 138.94KB | 38.02KB | ▼ 72.63% |
img/USPS.png | 86.83KB | 21.30KB | ▼ 75.47% |
includes/settings/aus.png | 24.53KB | 11.06KB | ▼ 54.90% |
img/address_validation_2.png | 92.01KB | 25.03KB | ▼ 72.79% |
img/DHL.png | 60.09KB | 12.00KB | ▼ 80.03% |