Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼3.08ms] Passed 4 tests
Analyzing server-side resources used by WooCommerce Royal Mail Shipping Calculator
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.54 ▲0.08 | 41.26 ▼2.26 |
Dashboard /wp-admin | 3.39 ▲0.08 | 47.84 ▼2.14 |
Posts /wp-admin/edit.php | 3.50 ▲0.14 | 52.75 ▲7.61 |
Add New Post /wp-admin/post-new.php | 5.97 ▲0.08 | 94.47 ▼5.54 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 34.23 ▼2.39 |
Server storage [IO: ▲2.67MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 123 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Royal Mail Shipping Calculator
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲3 | 14.25 ▼0.10 | 1.99 ▲0.03 | 44.12 ▼0.33 |
Dashboard /wp-admin | 2,198 ▲20 | 5.65 ▼0.03 | 89.29 ▼18.46 | 40.71 ▼3.62 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.03 ▲0.01 | 38.75 ▼3.81 | 35.69 ▲2.18 |
Add New Post /wp-admin/post-new.php | 1,537 ▲11 | 18.18 ▼4.87 | 610.69 ▼81.17 | 77.68 ▲20.47 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.24 ▲0.05 | 94.58 ▼9.62 | 40.30 ▼5.78 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
The following issues need your attention
- 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WPRuby\\RoyalMailLite\\PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
- > PHP Fatal error
Uncaught Error: Interface 'TypistTech\\Imposter\\ImposterInterface' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/vendor/typisttech/imposter/src/Imposter.php:7
- > PHP Fatal error
Uncaught Error: Class 'WPRuby\\RoyalMailLite\\Psr\\Log\\AbstractLogger' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/vendor/psr/log/Psr/Log/NullLogger.php:13
- > PHP Fatal error
Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/class-wc-royal-mail-shipping-method.php:11
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/vendor/dvdoug/boxpacker/tests/OrientatedItemTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'WC_Royal_Mail_Shipping_Method' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/class-wc-royal-mail-shipping-method-legacy.php:8
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/vendor/dvdoug/boxpacker/tests/EfficiencyTest.php:16
- > PHP Fatal error
Uncaught Error: Interface 'WPRuby\\RoyalMailLite\\DVDoug\\BoxPacker\\Item' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/vendor/dvdoug/boxpacker/tests/Test/TestItem.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/includes/admin-options.php:1
- > PHP Fatal error
Uncaught Error: Class 'WPRuby\\RoyalMailLite\\DVDoug\\BoxPacker\\Test\\TestItem' not found in wp-content/plugins/royal-mail-woocommerce-shipping-calculator/vendor/dvdoug/boxpacker/tests/Test/ConstrainedPlacementNoStackingTestItem.php:14
- > 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)
Everything seems fine on the user side
Optimizations
Plugin configuration 86% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: woocommerce, evri, woocommerce extension, shipping, royal mail...
royal-mail-woocommerce-shipping-calculator/wc-royal-mail.php 69% from 13 tests
"WooCommerce Royal Mail Shipping Calculator" version 1.7.12's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
- Domain Path: The domain path folder does not exist ("/languages")
- Main file name: It is recommended to name the main PHP file as the plugin slug ("royal-mail-woocommerce-shipping-calculator.php" instead of "wc-royal-mail.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "3.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin6,890 lines of code in 107 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 91 | 1,387 | 3,219 | 6,036 |
JSON | 1 | 0 | 0 | 312 |
YAML | 4 | 44 | 3 | 192 |
Cucumber | 2 | 20 | 0 | 148 |
reStructuredText | 7 | 91 | 187 | 136 |
Python | 1 | 39 | 92 | 40 |
XML | 1 | 5 | 1 | 26 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 6.37 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 87.00 |
Average method complexity | 1.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 9 | |
Interfaces | 12 | |
Traits | 2 | |
Classes | 70 | |
▷ Abstract classes | 2 | 2.86% |
▷ Concrete classes | 68 | 97.14% |
▷ Final classes | 0 | 0.00% |
Methods | 496 | |
▷ Static methods | 41 | 8.27% |
▷ Public methods | 436 | 87.90% |
▷ Protected methods | 11 | 2.22% |
▷ Private methods | 49 | 9.88% |
Functions | 28 | |
▷ Named functions | 1 | 3.57% |
▷ Anonymous functions | 27 | 96.43% |
Constants | 20 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 20 | 100.00% |
▷ Public constants | 19 | 95.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/assets/images/wpruby_logo.png | 10.60KB | 8.55KB | ▼ 19.39% |