84% easy-options-hide-shipping-method-per-product-wc

Code Review | Easy Options Hide Shipping Method per product for WooCommerce

WordPress plugin Easy Options Hide Shipping Method per product for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: easy-options-hide...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.9.3
  • WordPress version: 6.3.1
  • First release: Nov 12, 2020
  • Latest release: May 19, 2022
  • Number of updates: 6
  • Update frequency: every 92.2 days
  • Top authors: jsherk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /1,047 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.38ms] Passed 4 tests

This is a short check of server-side resources used by Easy Options Hide Shipping Method per product for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0334.90 ▼8.66
Dashboard /wp-admin3.34 ▲0.0347.12 ▼0.66
Posts /wp-admin/edit.php3.39 ▲0.0347.41 ▲2.15
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.75 ▼12.57
Media Library /wp-admin/upload.php3.26 ▲0.0336.30 ▼3.64
Easy Options Hide Shipping Method per product WC /wp-admin/options-general.php?page=easy-options-hide-shipping-method-per-product-wc3.2333.19

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Options Hide Shipping Method per product for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.32 ▼0.851.56 ▼0.3642.46 ▲3.65
Dashboard /wp-admin2,213 ▲225.86 ▲1.0199.90 ▼10.0240.03 ▼4.95
Posts /wp-admin/edit.php2,093 ▲222.03 ▼0.0439.82 ▲1.6334.99 ▼1.59
Add New Post /wp-admin/post-new.php1,528 ▼1423.21 ▲4.69672.53 ▲57.4959.31 ▲2.54
Media Library /wp-admin/upload.php1,392 ▲104.16 ▼0.05104.57 ▲3.7046.10 ▲1.00
Easy Options Hide Shipping Method per product WC /wp-admin/options-general.php?page=easy-options-hide-shipping-method-per-product-wc7592.0524.5241.25

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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-options-hide-shipping-method-per-product-wc/easy-options-hide-shipping-method-per-product-wc.php:47

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: per product, shipping option, shipping method, hide shipping, hide...

easy-options-hide-shipping-method-per-product-wc/easy-options-hide-shipping-method-per-product-wc.php 92% from 13 tests

This is the main PHP file of "Easy Options Hide Shipping Method per product for WooCommerce" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin145 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14239145

PHP code Passed 2 tests

A short review 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.16
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%
Functions8
▷ Named functions8100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dbut.png13.46KB6.06KB▼ 55.01%
dbut-small.png5.33KB2.67KB▼ 49.92%
stars-small.png1.50KB1.51KB0.00%