Benchmarks
Plugin footprint 64% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲6.14MB] [CPU: ▲31.66ms] 75% from 4 tests
Server-side resources used by Mojito Shipping
It is recommended to improve the following
- Extra RAM: Extra memory usage must be kept under 5MB (currently 6.14MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.69 ▲6.23 | 79.05 ▲36.94 |
Dashboard /wp-admin | 9.71 ▲6.41 | 80.54 ▲25.96 |
Posts /wp-admin/edit.php | 9.71 ▲6.35 | 87.91 ▲39.14 |
Add New Post /wp-admin/post-new.php | 11.44 ▲5.56 | 127.88 ▲38.70 |
Media Library /wp-admin/upload.php | 9.71 ▲6.48 | 79.20 ▲25.05 |
Mojito Shipping /wp-admin/options-general.php?page=mojito-shipping | 9.71 | 70.75 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 9.71 | 65.16 |
Server storage [IO: ▲35.47MB] [DB: ▲0.15MB] 67% from 3 tests
Input-output and database impact of this plugin
Please try to fix the following items
- Total filesystem usage must be limited to 25MB (currently using 35.47MB)
Filesystem: 639 new files
Database: no new tables, 11 new options
New WordPress options |
---|
db_upgraded |
fs_active_plugins |
widget_recent-posts |
mojito-shipping-pymexpress-preloaded |
widget_theysaidso_widget |
theysaidso_admin_options |
fs_accounts |
fs_debug_mode |
widget_recent-comments |
woocommerce_default_country |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Mojito Shipping
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,939 ▲182 | 13.77 ▼0.98 | 5.08 ▲2.90 | 29.90 ▼17.45 |
Dashboard /wp-admin | 2,240 ▲49 | 5.00 ▲0.09 | 111.98 ▲8.85 | 41.05 ▼2.31 |
Posts /wp-admin/edit.php | 2,120 ▲34 | 2.50 ▲0.53 | 41.95 ▲4.22 | 41.01 ▲6.41 |
Add New Post /wp-admin/post-new.php | 1,531 ▲17 | 23.43 ▲5.84 | 689.08 ▲10.65 | 61.63 ▲8.73 |
Media Library /wp-admin/upload.php | 1,416 ▲28 | 4.43 ▲0.14 | 98.66 ▼4.61 | 46.49 ▲4.61 |
Mojito Shipping /wp-admin/options-general.php?page=mojito-shipping | 1,034 | 1.85 | 26.90 | 57.93 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,094 | 1.90 | 27.11 | 28.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.08MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/mojito-shipping/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- This plugin does not fully uninstall, leaving 11 options in the database
- mojito-shipping-pymexpress-preloaded
- woocommerce_default_country
- fs_debug_mode
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- fs_accounts
- db_upgraded
- fs_active_plugins
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 84× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_014.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_026.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_051.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_055.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_036.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_039.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_pdf417_html.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/barcodes/example_2d_qrcode_svgi.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_023.php
- > /wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_022.php
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function bcadd() in wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/tcpdf_barcodes_1d.php:2080
- > PHP Fatal error
Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/mojito-shipping/includes/class-mojito-shipping-method-glovo.php:17
- > PHP Warning
require_once(wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_066.php on line 22
- > PHP Fatal error
require_once(): Failed opening required 'wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/example_066.php on line 22
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
- Donate link: Invalid url: ""
mojito-shipping/mojito-shipping.php 92% from 13 tests
"Mojito Shipping" version 1.4.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "5.2")
Code Analysis 0% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
It is important to fix the following items
- Do not include executable or dangerous files in your plugin
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
- ☣ wp-content/plugins/mojito-shipping/vendor/tecnickcom/tcpdf/examples/data/cert/tcpdf.crt
- .crt - Security Certificate in Firefox, IE, Chrome, Safari
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 384 | 13,672 | 38,506 | 96,860 |
PO File | 14 | 7,784 | 10,407 | 17,386 |
SVG | 7 | 1 | 1 | 1,915 |
JavaScript | 6 | 193 | 124 | 707 |
CSS | 15 | 0 | 4 | 279 |
Markdown | 2 | 89 | 0 | 277 |
JSON | 7 | 0 | 0 | 169 |
YAML | 1 | 0 | 0 | 1 |
PHP code 0% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
These items need your attention
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,415)
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 500)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 132.67 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4,415.00 |
Average method complexity | 6.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 500.00 |
Code structure | ||
---|---|---|
Namespaces | 3 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 91 | |
▷ Abstract classes | 2 | 2.20% |
▷ Concrete classes | 89 | 97.80% |
▷ Final classes | 0 | 0.00% |
Methods | 2,171 | |
▷ Static methods | 325 | 14.97% |
▷ Public methods | 1,472 | 67.80% |
▷ Protected methods | 295 | 13.59% |
▷ Private methods | 404 | 18.61% |
Functions | 119 | |
▷ Named functions | 103 | 86.55% |
▷ Anonymous functions | 16 | 13.45% |
Constants | 284 | |
▷ Global constants | 237 | 83.45% |
▷ Class constants | 47 | 16.55% |
▷ Public constants | 47 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.58MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/tecnickcom/tcpdf/examples/images/_blank.png | 0.13KB | 0.09KB | ▼ 30.66% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
vendor/tecnickcom/tcpdf/examples/images/alpha.png | 23.30KB | 30.34KB | 0.00% |
vendor/tecnickcom/tcpdf/examples/images/logo_example.png | 17.41KB | 17.68KB | 0.00% |
vendor/tecnickcom/tcpdf/examples/images/tcpdf_signature.png | 66.18KB | 25.47KB | ▼ 61.51% |