88% hide-shipping-methods-in-woocommerce

Code Review | Hide Shipping Methods in WooCommerce

WordPress plugin Hide Shipping Methods in WooCommerce scored88%from 54 tests.

About plugin

  • Plugin page: hide-shipping-met...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Dec 5, 2019
  • Latest release: Sep 3, 2022
  • Number of updates: 7
  • Update frequency: every 143.6 days
  • Top authors: dewtechnolab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,140 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
Installer ran successfully

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

An overview of server-side resources used by Hide Shipping Methods in WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.31 ▼10.32
Dashboard /wp-admin3.32 ▲0.0142.61 ▼9.31
Posts /wp-admin/edit.php3.37 ▲0.0148.80 ▲1.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.38 ▼14.73
Media Library /wp-admin/upload.php3.24 ▲0.0133.78 ▲1.56

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
dew_hide_shipping_options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Hide Shipping Methods in WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.14 ▼1.241.79 ▲0.0141.66 ▼1.65
Dashboard /wp-admin2,206 ▲155.91 ▲1.00103.78 ▼2.3439.33 ▼2.80
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0039.16 ▲1.8235.57 ▲3.09
Add New Post /wp-admin/post-new.php1,538 ▲1723.17 ▼0.13664.20 ▲64.8459.58 ▲3.46
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.01106.57 ▲9.8048.12 ▲6.14

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 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • dew_hide_shipping_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 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)
Even though no errors were found, this is by no means an exhaustive test

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
Looking good! No server-side errors or output 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 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

hide-shipping-methods-in-woocommerce/hide-shipping-methods.php 62% from 13 tests

"Hide Shipping Methods in WooCommerce" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 197 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.5.0" instead of "4.5")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hide-shipping-methods-in-woocommerce.php" instead of "hide-shipping-methods.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin67 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP212567

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin