83% multiple-shipping-options-for-woocommerce

Code Review | Multiple Shipping Options for WooCommerce

WordPress plugin Multiple Shipping Options for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: multiple-shipping...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 1, 2021
  • Latest release: Jul 20, 2023
  • Number of updates: 19
  • Update frequency: every 36.2 days
  • Top authors: minilogicstechnology (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /451 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.83ms] Passed 4 tests

An overview of server-side resources used by Multiple Shipping Options for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.21 ▼3.41
Dashboard /wp-admin3.38 ▲0.0847.50 ▲0.40
Posts /wp-admin/edit.php3.50 ▲0.1451.90 ▲1.65
Add New Post /wp-admin/post-new.php5.96 ▲0.0883.74 ▼17.97
Media Library /wp-admin/upload.php3.31 ▲0.0834.64 ▲4.16

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Multiple Shipping Options for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.81 ▲0.451.62 ▼0.0840.78 ▲0.44
Dashboard /wp-admin2,212 ▲245.06 ▲0.18107.54 ▼2.4639.58 ▼6.76
Posts /wp-admin/edit.php2,092 ▲62.00 ▼0.0140.59 ▲0.3435.55 ▲2.43
Add New Post /wp-admin/post-new.php1,540 ▲1122.91 ▲4.53663.90 ▲53.7557.81 ▼1.39
Media Library /wp-admin/upload.php1,391 ▲34.29 ▲0.01101.92 ▲3.6143.80 ▲0.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/multiple-shipping-options-for-woocommerce/mso-install.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 30 tag instead of maximum 10
The official readme.txt is a good inspiration

multiple-shipping-options-for-woocommerce/multiple-shipping-options-for-woocommerce.php 77% from 13 tests

The primary PHP file in "Multiple Shipping Options for WooCommerce" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 238 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "7.0.0")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 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
No dangerous file extensions were detected14,386 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,4032376,644
PHP367231,7496,008
JavaScript43652781,723
JSON20011

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity25.42
▷ Minimum class complexity1.00
▷ Maximum class complexity283.00
Average method complexity6.22
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces26
Interfaces0
Traits0
Classes31
▷ Abstract classes00.00%
▷ Concrete classes31100.00%
▷ Final classes00.00%
Methods146
▷ Static methods3826.03%
▷ Public methods14498.63%
▷ Protected methods00.00%
▷ Private methods21.37%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pallet.png31.82KB31.82KB0.00%
images/bin.png39.40KB16.74KB▼ 57.51%
images/pdf.png7.72KB4.09KB▼ 46.98%