87% advanced-free-flat-shipping-woocommerce

Code Review | Conditional shipping & Advanced Flat rate shipping rates / Flexible shipping for WooCommerce shipping

WordPress plugin Conditional shipping & Advanced Flat rate shipping rates / Flexible shipping for WooCommerce shipping scored 87% from 54 tests.

About plugin

  • Plugin page: advanced-free-fla...
  • Plugin version: 1.6.3.41
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9.1
  • WordPress version: 5.9.2
  • First release: Oct 28, 2019
  • Latest release: Mar 24, 2022
  • Number of updates: 96
  • Update frequency: every 9.2 days
  • Top authors: jyotsnasingh520 (54.17%)rajeshsingh520 (46.88%)

Code review

54 tests

User reviews

25 reviews

Install metrics

1,000+ active / 30,669 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Conditional shipping & Advanced Flat rate shipping rates / Flexible shipping for WooCommerce shipping
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0260.98 ▲1.08
Dashboard /wp-admin3.42 ▲0.0135.73 ▼14.74
Posts /wp-admin/edit.php3.66 ▲0.0141.28 ▼0.21
Add New Post /wp-admin/post-new.php6.89 ▼0.08114.13 ▼1,318.76
Media Library /wp-admin/upload.php3.31 ▲0.0129.83 ▲3.36

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 101 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Conditional shipping & Advanced Flat rate shipping rates / Flexible shipping for WooCommerce shipping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲5115.59 ▼0.325.59 ▼0.042.18 ▼0.12
Dashboard /wp-admin2,902 ▲416.16 ▼0.00118.64 ▼17.76152.52 ▼9.50
Posts /wp-admin/edit.php2,701 ▲73.24 ▼0.0163.92 ▼3.94143.51 ▼9.50
Add New Post /wp-admin/post-new.php1,667 ▼2316.20 ▼4.94383.32 ▼60.10153.62 ▲0.66
Media Library /wp-admin/upload.php1,708 ▲105.49 ▲0.03141.90 ▲5.90186.28 ▲3.20

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advanced-free-flat-shipping-woocommerce/includes/pisol.class.form.php
    • > /wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/help.php
  • 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'pisol_help' not found in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/additional-charges/template/weight-based-charges.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/partials/listShippingMethod.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/additional-charges/additional-charges.php:5
    • > PHP Warning
      Use of undefined constant PI_EFRS_SELECTION_RULE_SLUG - assumed 'PI_EFRS_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/custom-group/rules/virtual_category_product.php on line 129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/additional-charges/additional-charges.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/selection_rules/rules/delivery_type.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/selection_rules/rules/category_product.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/custom-group/rules/virtual_category_qty.php:8
    • > PHP Warning
      Use of undefined constant PI_EFRS_SELECTION_RULE_SLUG - assumed 'PI_EFRS_SELECTION_RULE_SLUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/selection_rules/rules/delivery_type.php on line 139
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/additional-charges/pro-charges.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #6 in advanced-free-flat-shipping-woocommerce/assets to your readme.txt
  • Donate link: Invalid URI ("")
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

advanced-free-flat-shipping-woocommerce/extended-flat-rate-shipping-woocommerce.php 85% from 13 tests

"Conditional shipping & Advanced Flat rate shipping rates / Flexible shipping for WooCommerce shipping" version 1.6.3.41's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-free-flat-shipping-woocommerce.php" instead of "extended-flat-rate-shipping-woocommerce.php")
  • Description: The description should be shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin19,667 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
CSS42,055389,430
SVG8774,890
PHP571,2015974,764
JavaScript610666583

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.92
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes38
▷ Abstract classes00.00%
▷ Concrete classes38100.00%
▷ Final classes00.00%
Methods307
▷ Static methods5818.89%
▷ Public methods30298.37%
▷ Protected methods00.00%
▷ Private methods51.63%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.55MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/additional-charges/image/cart-weight.png23.80KB7.80KB▼ 67.21%
admin/additional-charges/image/product-quantity.png28.36KB9.47KB▼ 66.60%
admin/additional-charges/image/cart-quantity.png30.11KB9.79KB▼ 67.48%
includes/background.png74.27KB26.29KB▼ 64.60%
admin/additional-charges/image/product-subtotal.png25.63KB8.61KB▼ 66.42%