88% cart2cart-zen-cart-to-woocommerce-migration

Code Review | Cart2Cart: Zen Cart to WooCommerce Migration

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

About plugin

  • Plugin page: cart2cart-zen-car...
  • 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: 35
  • Update frequency: every 81.5 days
  • Top authors: Cart2Cart (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 2,964 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Cart2Cart: Zen Cart to WooCommerce Migration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2357.08 ▲4.72
Dashboard /wp-admin3.59 ▲0.1840.09 ▲5.73
Posts /wp-admin/edit.php3.82 ▲0.1840.17 ▲2.66
Add New Post /wp-admin/post-new.php7.06 ▲0.0895.91 ▼1,160.31
Media Library /wp-admin/upload.php3.47 ▲0.1725.20 ▼0.07
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help3.4724.70
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration3.4725.00
How it works /wp-admin/admin.php?page=cart2cart-how-it-works3.4723.58
Settings /wp-admin/admin.php?page=cart2cart-migration-settings3.4524.69
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services3.4722.45

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: 1 new table, no new options
New tables
wp_c2c_config

Browser metrics Passed 4 tests

An overview of browser requirements for Cart2Cart: Zen Cart to WooCommerce Migration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,808 ▲5415.90 ▲0.305.92 ▼0.892.12 ▼0.31
Dashboard /wp-admin2,932 ▲716.17 ▲0.03122.01 ▼11.27174.54 ▲12.63
Posts /wp-admin/edit.php2,729 ▲383.12 ▼0.1160.64 ▼4.59144.83 ▲0.42
Add New Post /wp-admin/post-new.php1,695 ▲3419.17 ▲2.53396.56 ▼26.43190.80 ▲24.24
Media Library /wp-admin/upload.php1,744 ▲435.53 ▲0.00127.54 ▼14.93199.69 ▲11.61
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help1,3757.17221.26152.52
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration1,7678.22227.63183.51
How it works /wp-admin/admin.php?page=cart2cart-how-it-works1,3956.94138.87123.88
Settings /wp-admin/admin.php?page=cart2cart-migration-settings1,0322.3854.2289.43
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services1,4677.14137.91136.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cart2cart-zen-cart-to-woocommerce-migration/bridge2cart/bridge.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cart2cart-zen-cart-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-zen-cart-to-woocommerce-migration/passwords/cart2cart-password-migration.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
The official readme.txt is a good inspiration

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

"Cart2Cart: Zen Cart to WooCommerce Migration" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cart2cart-zen-cart-to-woocommerce-migration.php" instead of "index.php")
  • Description: The description should be shorter than 140 characters (currently 179 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 plugin5,647 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP151,2681,2995,629
CSS14018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
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%