88% hide-shipping-method-for-woocommerce

Code Review | Hide Shipping Method For WooCommerce

WordPress plugin Hide Shipping Method For WooCommerce scored88%from 54 tests.

About plugin

  • Plugin page: hide-shipping-met...
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2019
  • Latest release: Aug 8, 2023
  • Number of updates: 41
  • Update frequency: every 32.4 days
  • Top authors: dots (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

10,000+ active /129,774 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.27ms] Passed 4 tests

An overview of server-side resources used by Hide Shipping Method For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.69 ▼5.33
Dashboard /wp-admin3.31 ▼0.0444.86 ▼12.70
Posts /wp-admin/edit.php3.36 ▲0.0048.15 ▲3.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.28 ▼11.95
Media Library /wp-admin/upload.php3.24 ▲0.0034.53 ▲0.89

Server storage [IO: ▲8.06MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 268 new files
Database: no new tables, 10 new options
New WordPress options
fs_active_plugins
whsm_version
theysaidso_admin_options
fs_accounts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
fs_debug_mode
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Shipping Method For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.18 ▼1.121.72 ▼0.6742.58 ▼4.48
Dashboard /wp-admin2,203 ▲185.82 ▼0.0899.89 ▼2.8237.58 ▼3.21
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0139.10 ▲2.7835.40 ▼1.55
Add New Post /wp-admin/post-new.php1,533 ▲1423.17 ▲0.16653.00 ▼28.3656.71 ▲5.09
Media Library /wp-admin/upload.php1,388 ▲34.20 ▲0.0193.98 ▼3.2743.63 ▼1.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • fs_accounts
    • fs_active_plugins
    • theysaidso_admin_options
    • fs_debug_mode
    • db_upgraded
    • widget_recent-posts
    • whsm_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

hide-shipping-method-for-woocommerce/woo-hide-shipping-methods.php 77% from 13 tests

"Hide Shipping Method For WooCommerce" version 1.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("hide-shipping-method-for-woocommerce.php" instead of "woo-hide-shipping-methods.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.1")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 95% 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
There were no executable files found in this plugin45,533 lines of code in 175 files:
LanguageFilesBlank linesComment linesLines of code
PHP1378,65418,60338,754
PO File41,6522,7874,452
JavaScript72332511,486
CSS234359795
XML10038
SVG3008

PHP code 0% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 134)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity91.91
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes57
▷ Abstract classes23.51%
▷ Concrete classes5596.49%
▷ Final classes00.00%
Methods1,365
▷ Static methods21215.53%
▷ Public methods96770.84%
▷ Protected methods191.39%
▷ Private methods37927.77%
Functions112
▷ Named functions11199.11%
▷ Anonymous functions10.89%
Constants159
▷ Global constants10968.55%
▷ Class constants5031.45%
▷ Public constants50100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 PNG files occupy 3.09MB with 1.92MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/getting-started/option-1-2.png55.13KB16.32KB▼ 70.40%
admin/images/pro-features-img/feature-box-nine-img.png120.95KB42.93KB▼ 64.51%
admin/images/pro-features-img/feature-box-seven-img.png170.58KB55.09KB▼ 67.70%
admin/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
admin/images/getting-started/option-4-3.png50.48KB15.45KB▼ 69.39%