89% wc-hide-shipping-methods

Code Review | WC Hide Shipping Methods

WordPress plugin WC Hide Shipping Methods scored89%from 54 tests.

About plugin

  • Plugin page: wc-hide-shipping-...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2017
  • Latest release: Sep 9, 2021
  • Number of updates: 13
  • Update frequency: every 123.8 days
  • Top authors: Rynald0s (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

40,000+ active /146,358 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by WC Hide Shipping Methods
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0136.34 ▼5.33
Dashboard /wp-admin3.35 ▲0.0145.74 ▼5.39
Posts /wp-admin/edit.php3.40 ▲0.0146.89 ▼1.11
Add New Post /wp-admin/post-new.php5.93 ▲0.0190.20 ▼19.02
Media Library /wp-admin/upload.php3.27 ▲0.0136.60 ▼3.13

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: no files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
wc_hide_shipping_options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WC Hide Shipping Methods: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.101.84 ▲0.0341.73 ▼0.19
Dashboard /wp-admin2,206 ▲215.83 ▼0.0295.60 ▼2.1838.05 ▼2.72
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0338.48 ▲2.8835.03 ▼0.21
Add New Post /wp-admin/post-new.php1,533 ▲1423.17 ▲0.01651.59 ▼16.9349.28 ▼0.60
Media Library /wp-admin/upload.php1,382 ▼64.22 ▲0.1097.88 ▼20.7844.37 ▼3.58

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wc_hide_shipping_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 90% 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
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wc-hide-shipping-methods/hide-shipping-free-shipping.php 85% from 13 tests

"WC Hide Shipping Methods" version 1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-hide-shipping-methods.php" instead of "hide-shipping-free-shipping.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 197 characters long)

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
Good job! No executable or dangerous file extensions detected59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1221959

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin