84% variation-duplicator-for-woocommerce

Code Review | Duplicate Variations for WooCommerce

WordPress plugin Duplicate Variations for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: variation-duplica...
  • Plugin version: 2.0.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jan 24, 2021
  • Latest release: Sep 4, 2023
  • Number of updates: 17
  • Update frequency: every 56.4 days
  • Top authors: EmranAhmed (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

2,000+ active /23,232 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Duplicate Variations for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.42 ▼8.20
Dashboard /wp-admin3.32 ▼0.0244.52 ▼13.50
Posts /wp-admin/edit.php3.44 ▲0.0845.49 ▼2.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.29 ▼23.57
Media Library /wp-admin/upload.php3.25 ▲0.0234.52 ▼3.62

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Duplicate Variations for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.29 ▲0.251.70 ▼0.0139.47 ▼3.88
Dashboard /wp-admin2,215 ▲275.79 ▲0.7796.94 ▼16.2040.40 ▼4.25
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.0535.58 ▼4.3234.70 ▼2.55
Add New Post /wp-admin/post-new.php1,548 ▲2923.48 ▲0.50664.64 ▲7.2452.44 ▼24.47
Media Library /wp-admin/upload.php1,397 ▲94.16 ▼0.0695.10 ▼9.4943.98 ▼0.54

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/variation-duplicator-for-woocommerce/includes/class-variation-duplicator-for-woocommerce-variation-image-clone.php
    • > /wp-content/plugins/variation-duplicator-for-woocommerce/includes/html-variation-duplicator-form.php
    • > /wp-content/plugins/variation-duplicator-for-woocommerce/includes/class-variation-duplicator-for-woocommerce-backend.php
    • > /wp-content/plugins/variation-duplicator-for-woocommerce/includes/class-variation-duplicator-for-woocommerce.php
    • > /wp-content/plugins/variation-duplicator-for-woocommerce/includes/class-variation-duplicator-for-woocommerce-variation-clone.php
    • > /wp-content/plugins/variation-duplicator-for-woocommerce/variation-duplicator-for-woocommerce.php

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: product variation image copy, variation images clone, woocommerce variations duplicate, product variation image duplicate, variation image duplicate

variation-duplicator-for-woocommerce/variation-duplicator-for-woocommerce.php 92% from 13 tests

The entry point to "Duplicate Variations for WooCommerce" version 2.0.8 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,049 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP718450549
JavaScript25066339
CSS248161

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.40
▷ Minimum class complexity2.00
▷ Maximum class complexity24.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods50
▷ Static methods612.00%
▷ Public methods4692.00%
▷ Protected methods48.00%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin