83% innozilla-per-product-shipping-woocommerce

Code Review | Innozilla Per Product Shipping WooCommerce

WordPress plugin Innozilla Per Product Shipping WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: innozilla-per-pro...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 17, 2020
  • Latest release: Sep 12, 2023
  • Number of updates: 119
  • Update frequency: every 11.0 days
  • Top authors: innozilla (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active / 21,950 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.89ms] Passed 4 tests

Analyzing server-side resources used by Innozilla Per Product Shipping WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1337.79 ▼3.14
Dashboard /wp-admin3.43 ▲0.1244.63 ▼0.94
Posts /wp-admin/edit.php3.54 ▲0.1949.31 ▲2.18
Add New Post /wp-admin/post-new.php6.03 ▲0.1483.88 ▼11.04
Media Library /wp-admin/upload.php3.35 ▲0.1233.92 ▼0.42

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: 1 new table, 7 new options
New tables
wp_innozilla_per_product_shipping_rules_woo
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
IPPSW_PER_PRODUCT_SHIPPING_VERSION
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Innozilla Per Product Shipping WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.21 ▼1.411.83 ▼0.1040.57 ▼6.90
Dashboard /wp-admin2,223 ▲384.85 ▼1.0096.65 ▼5.9139.69 ▼6.98
Posts /wp-admin/edit.php2,102 ▲102.00 ▼0.0339.22 ▼0.7736.19 ▲3.33
Add New Post /wp-admin/post-new.php1,528 ▲823.09 ▼0.25625.04 ▼55.8361.09 ▼4.37
Media Library /wp-admin/upload.php1,405 ▲204.19 ▲0.0698.19 ▼10.1844.22 ▼2.31

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 were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • IPPSW_PER_PRODUCT_SHIPPING_VERSION
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant IPPSW_PLUGIN_DIR - assumed 'IPPSW_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/innozilla-per-product-shipping-woocommerce/includes/init.php on line 10
    • > PHP Warning
      require_once(IPPSW_PLUGIN_DIR/includes/ippsw-admin.php): failed to open stream: No such file or directory in wp-content/plugins/innozilla-per-product-shipping-woocommerce/includes/init.php on line 10
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/innozilla-per-product-shipping-woocommerce/classes/Setup.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/innozilla-per-product-shipping-woocommerce/classes/Setup.php:7
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/innozilla-per-product-shipping-woocommerce/classes/Setup.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'IPPSW_Exception' not found in wp-content/plugins/innozilla-per-product-shipping-woocommerce/classes/exceptions/Missing_Dependencies_Exception.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'IPPSW_PLUGIN_DIR/includes/ippsw-admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/innozilla-per-product-shipping-woocommerce/includes/init.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/innozilla-per-product-shipping-woocommerce/woocommerce-innozilla-shipping-per-product.php:19
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/innozilla-per-product-shipping-woocommerce/classes/Setup.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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, per product shipping, variation, woocommerce

innozilla-per-product-shipping-woocommerce/woocommerce-innozilla-shipping-per-product.php 77% from 13 tests

The main PHP file in "Innozilla Per Product Shipping WooCommerce" ver. 1.0.4 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: Name the main plugin file the same as the plugin slug ("innozilla-per-product-shipping-woocommerce.php" instead of "woocommerce-innozilla-shipping-per-product.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path folder does not exist ("/languages/")

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
Everything looks great! No dangerous files found in this plugin822 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP14162189680
CSS1220141
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.12
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.78
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods2681.25%
▷ Protected methods00.00%
▷ Private methods618.75%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants981.82%
▷ Class constants218.18%
▷ Public constants2100.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
No PNG files were detected