90% free-shipping-hide-other-methods-woo

Code Review | Free shipping + Flat rate and hide other methods for WooCommerce

WordPress plugin Free shipping + Flat rate and hide other methods for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: free-shipping-hid...
  • Plugin version: 2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 2, 2020
  • Latest release: Oct 16, 2023
  • Number of updates: 28
  • Update frequency: every 39.6 days
  • Top authors: webdados (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,457 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by Free shipping + Flat rate and hide other methods for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.03 ▲1.01
Dashboard /wp-admin3.31 ▲0.0158.89 ▲12.95
Posts /wp-admin/edit.php3.37 ▲0.0144.81 ▼2.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.15 ▼5.38
Media Library /wp-admin/upload.php3.24 ▲0.0136.47 ▲0.06

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Free shipping + Flat rate and hide other methods for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.07 ▼0.461.82 ▲0.0143.49 ▲0.59
Dashboard /wp-admin2,195 ▲245.57 ▼0.0292.08 ▲5.4442.07 ▲2.07
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0632.84 ▼2.8735.20 ▼1.96
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.47633.36 ▼60.3145.09 ▼13.43
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0398.53 ▼9.2042.66 ▼3.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though everything seems fine, this is not 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: shipping, free shipping, flat rate, woocommerce

free-shipping-hide-other-methods-woo/free-shipping-hide-other-methods-woo.php 92% from 13 tests

This is the main PHP file of "Free shipping + Flat rate and hide other methods for WooCommerce" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 200 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected415 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP545199415

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity19.33
▷ Minimum class complexity11.00
▷ Maximum class complexity25.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods21
▷ Static methods314.29%
▷ Public methods1885.71%
▷ Protected methods00.00%
▷ Private methods314.29%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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