84% shipping-zone-duplicator-for-woocommerce

Code Review | Shipping Zone Duplicator for WooCommerce

WordPress plugin Shipping Zone Duplicator for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: shipping-zone-dup...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 28, 2022
  • Latest release: Mar 28, 2022
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: sormano (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /5,703 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by Shipping Zone Duplicator for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.81 ▼1.35
Dashboard /wp-admin3.31 ▼0.0453.00 ▼10.34
Posts /wp-admin/edit.php3.36 ▲0.0049.68 ▼3.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.50 ▼17.17
Media Library /wp-admin/upload.php3.23 ▲0.0033.35 ▼1.85

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Shipping Zone Duplicator for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.35 ▼0.141.86 ▼0.4844.27 ▲2.38
Dashboard /wp-admin2,195 ▲185.52 ▼0.0898.11 ▲7.1442.91 ▲0.94
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0540.01 ▲0.0938.04 ▲1.64
Add New Post /wp-admin/post-new.php1,531 ▲222.92 ▼0.26680.64 ▼6.4858.48 ▼6.85
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.02100.42 ▼11.5245.58 ▼7.92

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Shipping_Zone_Duplicator_for_WooCommerce\\add_action() in wp-content/plugins/shipping-zone-duplicator-for-woocommerce/shipping-zone-duplicator-for-woocommerce.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Shipping_Zone_Duplicator_for_WooCommerce\\Admin\\add_action() in wp-content/plugins/shipping-zone-duplicator-for-woocommerce/includes/admin/admin-functions.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
10 plugin tags: clone shipping, duplicate zones, duplicate zone, duplicator, woocommerce...

shipping-zone-duplicator-for-woocommerce/plugin.php 92% from 13 tests

"Shipping Zone Duplicator for WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shipping-zone-duplicator-for-woocommerce.php" instead of "plugin.php")

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
There were no executable files found in this plugin119 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34894101
JavaScript17218

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods150.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin