90% custom-shipping-methods-for-woocommerce

Code Review | Custom Shipping Methods for WooCommerce - Create Weight based Shipping, Conditional Shipping, Table Rate Shipping and much more

WordPress plugin Custom Shipping Methods for WooCommerce - Create Weight based Shipping, Conditional Shipping, Table Rate Shipping and much more scored90%from 54 tests.

About plugin

  • Plugin page: custom-shipping-m...
  • Plugin version: 1.9.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: May 13, 2018
  • Latest release: Nov 12, 2023
  • Number of updates: 59
  • Update frequency: every 34.1 days
  • Top authors: algoritmika (67.8%)Dhruvin (33.9%)

Code review

54 tests

User reviews

16 reviews

Install metrics

3,000+ active /34,588 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.73ms] Passed 4 tests

An overview of server-side resources used by Custom Shipping Methods for WooCommerce - Create Weight based Shipping, Conditional Shipping, Table Rate Shipping and much more
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.85 ▼0.92
Dashboard /wp-admin3.31 ▲0.0045.53 ▼4.48
Posts /wp-admin/edit.php3.36 ▲0.0044.96 ▲0.24
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.84 ▼12.49
Media Library /wp-admin/upload.php3.23 ▲0.0031.36 ▼1.03

Server storage [IO: ▲0.10MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Shipping Methods for WooCommerce - Create Weight based Shipping, Conditional Shipping, Table Rate Shipping and much more
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2814.13 ▼0.222.46 ▲0.1544.03 ▼1.32
Dashboard /wp-admin2,195 ▲215.61 ▲0.0387.74 ▼12.5837.13 ▼5.92
Posts /wp-admin/edit.php2,100 ▲31.97 ▲0.0140.28 ▲2.9035.64 ▲0.38
Add New Post /wp-admin/post-new.php1,526 ▼023.30 ▲0.01675.57 ▲59.8354.84 ▼0.53
Media Library /wp-admin/upload.php1,403 ▲64.19 ▲0.0296.49 ▼3.2441.76 ▼3.24

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

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

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)
Good news, no errors were detected

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
Please take inspiration from this readme.txt

custom-shipping-methods-for-woocommerce/custom-shipping-methods-for-woocommerce.php Passed 13 tests

This is the main PHP file of "Custom Shipping Methods for WooCommerce - Create Weight based Shipping, Conditional Shipping, Table Rate Shipping and much more" version 1.9.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
Add custom shipping methods to WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,222 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP71597051,219
JavaScript1173

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity19.67
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods50
▷ Static methods12.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin