88% cart2cart-virtuemart-to-woocommerce-migration

Code Review | Cart2Cart: VirtueMart to WooCommerce Migration

WordPress plugin Cart2Cart: VirtueMart to WooCommerce Migration scored 88% from 54 tests.

About plugin

  • Plugin page: cart2cart-virtuem...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.2-5.8
  • WordPress version: 5.9.2
  • First release: Mar 25, 2014
  • Latest release: Jan 12, 2022
  • Number of updates: 36
  • Update frequency: every 79.3 days
  • Top authors: Cart2Cart (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 6,862 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼294.52ms] Passed 4 tests

This is a short check of server-side resources used by Cart2Cart: VirtueMart to WooCommerce Migration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2358.13 ▲3.70
Dashboard /wp-admin3.60 ▲0.1836.06 ▼0.73
Posts /wp-admin/edit.php3.82 ▲0.18107.59 ▲67.13
Add New Post /wp-admin/post-new.php7.06 ▲0.0892.92 ▼1,184.01
Media Library /wp-admin/upload.php3.47 ▲0.1728.13 ▲2.97
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration3.4728.28
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services3.4728.59
How it works /wp-admin/admin.php?page=cart2cart-how-it-works3.4723.93
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help3.4737.15
Settings /wp-admin/admin.php?page=cart2cart-migration-settings3.4524.35

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 23 new files
Database: 1 new table, no new options
New tables
wp_c2c_config

Browser metrics Passed 4 tests

Cart2Cart: VirtueMart to WooCommerce Migration: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲6116.17 ▲0.575.96 ▼0.552.25 ▼0.25
Dashboard /wp-admin2,936 ▲786.14 ▼0.07123.33 ▼10.19185.67 ▲17.90
Posts /wp-admin/edit.php2,731 ▲403.24 ▲0.0064.05 ▲2.04147.16 ▼2.39
Add New Post /wp-admin/post-new.php1,801 ▲9021.87 ▲1.28441.10 ▼46.55245.30 ▲82.79
Media Library /wp-admin/upload.php1,739 ▲485.47 ▼0.04125.38 ▼44.78284.20 ▲53.96
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration1,7577.67227.50238.81
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services1,4707.24198.88124.86
How it works /wp-admin/admin.php?page=cart2cart-how-it-works1,3946.97187.58142.06
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help1,3406.97139.78159.18
Settings /wp-admin/admin.php?page=cart2cart-migration-settings1,0282.4154.5295.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cart2cart-virtuemart-to-woocommerce-migration/bridge2cart/bridge.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cart2cart-virtuemart-to-woocommerce-migration/passwords/cart2cart-password-migration.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cart2cart-virtuemart-to-woocommerce-migration/passwords/cart2cart-password-migration.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Contributors: Plugin contributors not specified
You can look at the official readme.txt

cart2cart-virtuemart-to-woocommerce-migration/index.php 85% from 13 tests

The main PHP file in "Cart2Cart: VirtueMart to WooCommerce Migration" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("cart2cart-virtuemart-to-woocommerce-migration.php" instead of "index.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
Good job! No executable or dangerous file extensions detected5,645 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP151,2681,2995,629
CSS14016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.07
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes83
▷ Abstract classes00.00%
▷ Concrete classes83100.00%
▷ Final classes00.00%
Methods257
▷ Static methods145.45%
▷ Public methods20479.38%
▷ Protected methods4617.90%
▷ Private methods72.72%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants85
▷ Global constants4047.06%
▷ Class constants4552.94%
▷ Public constants45100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png4.28KB1.39KB▼ 67.49%