88% cart2cart-woocommerce-to-woocommerce-migration

Code Review | Cart2Cart: WooCommerce to WooCommerce Migration

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

About plugin

  • Plugin page: cart2cart-woocomm...
  • 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 26, 2014
  • Latest release: Jan 12, 2022
  • Number of updates: 38
  • Update frequency: every 75.0 days
  • Top authors: Cart2Cart (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

70+ active / 7,167 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼291.31ms] Passed 4 tests

This is a short check of server-side resources used by Cart2Cart: WooCommerce to WooCommerce Migration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0851.85 ▼0.03
Dashboard /wp-admin3.45 ▲0.0432.44 ▼1.45
Posts /wp-admin/edit.php3.67 ▲0.0336.93 ▲1.02
Add New Post /wp-admin/post-new.php6.91 ▼0.0692.32 ▼1,164.77
Media Library /wp-admin/upload.php3.32 ▲0.0324.73 ▲1.39
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services3.3522.38
Settings /wp-admin/admin.php?page=cart2cart-migration-settings3.3326.01
How it works /wp-admin/admin.php?page=cart2cart-how-it-works3.2921.53
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration3.3324.77
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help3.3320.66

Server storage [IO: ▲0.24MB] [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: 23 new files
Database: 1 new table, no new options
New tables
wp_c2c_config

Browser metrics Passed 4 tests

Cart2Cart: WooCommerce to WooCommerce Migration: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲5115.70 ▼0.365.77 ▼0.922.12 ▼0.48
Dashboard /wp-admin2,936 ▲756.22 ▲0.05117.93 ▼15.72171.16 ▲9.49
Posts /wp-admin/edit.php2,736 ▲483.13 ▼0.1161.67 ▼1.32140.83 ▲0.53
Add New Post /wp-admin/post-new.php1,780 ▲11921.27 ▲5.17407.27 ▼27.70190.94 ▲34.56
Media Library /wp-admin/upload.php1,741 ▲435.50 ▲0.02123.39 ▼16.73209.99 ▲32.94
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services1,4637.17192.13132.04
Settings /wp-admin/admin.php?page=cart2cart-migration-settings1,0282.4051.6088.40
How it works /wp-admin/admin.php?page=cart2cart-how-it-works1,3927.20191.69113.51
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration1,7678.09166.77178.25
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help1,3696.92137.56152.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cart2cart-woocommerce-to-woocommerce-migration/bridge2cart/bridge.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cart2cart-woocommerce-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-woocommerce-to-woocommerce-migration/passwords/cart2cart-password-migration.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

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

The main PHP script in "Cart2Cart: WooCommerce to WooCommerce Migration" version 2.0.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cart2cart-woocommerce-to-woocommerce-migration.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected5,646 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP151,2671,2995,628
CSS14018

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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%