Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲5.05MB] [CPU: ▲23.65ms] 75% from 4 tests
This is a short check of server-side resources used by WooCommerce Shipping gateway per Product
The following require your attention
- Extra RAM: The extra memory usage must be under 5MB (currently 5.05MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.94 ▲5.48 | 64.98 ▲20.27 |
Dashboard /wp-admin | 8.96 ▲5.66 | 76.46 ▲25.86 |
Posts /wp-admin/edit.php | 8.96 ▲5.61 | 74.71 ▲30.24 |
Add New Post /wp-admin/post-new.php | 9.34 ▲3.46 | 111.42 ▲18.23 |
Media Library /wp-admin/upload.php | 8.96 ▲5.74 | 69.06 ▲33.99 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 8.96 | 71.55 |
Server storage [IO: ▲3.10MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 191 new files
Database: no new tables, 9 new options
New WordPress options |
---|
fs_debug_mode |
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
fs_accounts |
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
fs_active_plugins |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Shipping gateway per Product
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲72 | 13.65 ▼0.72 | 1.71 ▼0.18 | 33.14 ▼11.28 |
Dashboard /wp-admin | 2,218 ▲26 | 5.80 ▲0.82 | 138.75 ▲18.56 | 48.32 ▲3.39 |
Posts /wp-admin/edit.php | 2,109 ▲20 | 2.03 ▲0.04 | 41.53 ▲2.45 | 39.15 ▲6.48 |
Add New Post /wp-admin/post-new.php | 1,518 ▼1 | 23.14 ▼0.25 | 650.74 ▼35.87 | 49.80 ▼3.43 |
Media Library /wp-admin/upload.php | 1,406 ▲15 | 4.25 ▲0.10 | 96.41 ▲2.00 | 43.53 ▲0.36 |
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius | 1,068 | 2.05 | 26.90 | 28.58 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/woocommerce-shipping-gateway-per-product/freemius/includes/class-freemius.php+8515
Undefined property: stdClass::$plugins
- Zombie WordPress options detected upon uninstall: 9 options
- fs_active_plugins
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- fs_debug_mode
- fs_accounts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% 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
The following issues need your attention
- 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/woocommerce-shipping-gateway-per-product/inc/quick_bulk_edit_patch.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 88% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #2 (screenshot2.png), #3 (screenshot3.png)
- Tags: There are too many tags (14 tag instead of maximum 10)
woocommerce-shipping-gateway-per-product/woocommerce-product-shippings.php 77% from 13 tests
Analyzing the main PHP file in "WooCommerce Shipping gateway per Product" version 2.3.5
Please make the necessary changes and fix the following:
- Domain Path: The domain path folder does not exist ("/languages")
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-shipping-gateway-per-product.php" instead of "woocommerce-product-shippings.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected34,186 lines of code in 140 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 119 | 8,048 | 17,317 | 33,816 |
JavaScript | 5 | 45 | 60 | 240 |
CSS | 15 | 24 | 1 | 114 |
XML | 1 | 3 | 0 | 16 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
It is recommended to fix the following
- Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.63 |
Average class complexity | 93.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,088.00 |
Average method complexity | 4.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 48 | |
▷ Abstract classes | 2 | 4.17% |
▷ Concrete classes | 46 | 95.83% |
▷ Final classes | 0 | 0.00% |
Methods | 1,259 | |
▷ Static methods | 198 | 15.73% |
▷ Public methods | 869 | 69.02% |
▷ Protected methods | 17 | 1.35% |
▷ Private methods | 373 | 29.63% |
Functions | 122 | |
▷ Named functions | 120 | 98.36% |
▷ Anonymous functions | 2 | 1.64% |
Constants | 147 | |
▷ Global constants | 100 | 68.03% |
▷ Class constants | 47 | 31.97% |
▷ Public constants | 47 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/close-icon.png | 1.09KB | 1.00KB | ▼ 7.55% |
img/cross-flat.png | 2.93KB | 3.18KB | 0.00% |
img/attention.png | 21.31KB | 8.70KB | ▼ 59.18% |
img/help.png | 0.30KB | 0.32KB | 0.00% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |