77% 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 scored77%from 54 tests.

About plugin

  • Plugin page: advanced-free-fla...
  • Plugin version: 1.6.4.21
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.0
  • WordPress version: 6.3.1
  • First release: Oct 28, 2019
  • Latest release: Nov 30, 2023
  • Number of updates: 147
  • Update frequency: every 10.2 days
  • Top authors: rajeshsingh520 (65.31%)jyotsnasingh520 (35.37%)

Code review

54 tests

User reviews

44 reviews

Install metrics

2,000+ active /81,589 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
Installer ran successfully

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

A check of 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.48 ▲0.0134.50 ▼5.02
Dashboard /wp-admin3.32 ▲0.0147.11 ▼2.14
Posts /wp-admin/edit.php3.38 ▲0.0146.82 ▼2.99
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.93 ▼7.14
Media Library /wp-admin/upload.php3.25 ▲0.0133.93 ▲1.93

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 105 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Conditional shipping & Advanced Flat rate shipping rates / Flexible shipping for WooCommerce shipping: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.72 ▲0.151.65 ▲0.1736.80 ▼0.96
Dashboard /wp-admin2,201 ▲235.62 ▼0.0790.05 ▼21.5944.09 ▼0.68
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0040.46 ▼1.3135.90 ▼1.22
Add New Post /wp-admin/post-new.php1,536 ▲723.13 ▲0.09665.65 ▲11.0559.04 ▲3.85
Media Library /wp-admin/upload.php1,406 ▲124.28 ▲0.0896.09 ▼1.1141.27 ▼2.67

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 0% 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 items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/advanced-free-flat-shipping-woocommerce/includes/pisol.class.form.php
    • > /wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/help.php
  • 53× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/additional-charges/cart-subtotal-charges.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'pisol_help' not found in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/additional-charges/template/additional-charges.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/class-extended-flat-rate-shipping-woocommerce-add-shipping-method.php:329
    • > 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/selected_delivery_day.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 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_qty.php on line 204
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/custom-group/partials/listShippingMethod.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/advanced-free-flat-shipping-woocommerce/admin/combine-method.php:98
    • > 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_total.php on line 204

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Donate link: Invalid URI ("piwebsolution.com")
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #6 in advanced-free-flat-shipping-woocommerce/assets to your readme.txt
You can look at the official readme.txt

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

The main PHP file in "Conditional shipping & Advanced Flat rate shipping rates / Flexible shipping for WooCommerce shipping" ver. 1.6.4.21 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main 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: Please don't use more than 140 characters for the plugin description (currently 207 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
Success! There were no dangerous files found in this plugin20,218 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
CSS42,055389,430
PHP611,3916235,312
SVG8774,890
JavaScript610766586

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity16.83
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes42
▷ Abstract classes00.00%
▷ Concrete classes42100.00%
▷ Final classes00.00%
Methods336
▷ Static methods6017.86%
▷ Public methods33198.51%
▷ Protected methods00.00%
▷ Private methods51.49%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 0.55MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/additional-charges/image/cart-subtotal.png30.71KB9.27KB▼ 69.83%
admin/additional-charges/image/category-quantity.png30.07KB9.59KB▼ 68.10%
admin/additional-charges/image/shippingclass-quantity.png28.04KB8.65KB▼ 69.16%
admin/additional-charges/image/category-weight.png30.72KB9.89KB▼ 67.82%
admin/additional-charges/image/cart-weight.png23.80KB7.80KB▼ 67.21%