82% cart2cart-bigcommerce-to-woocommerce-migration

Code Review | Cart2Cart: BigCommerce to WooCommerce Migration

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

About plugin

  • Plugin page: cart2cart-bigcomm...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.2-5.8
  • WordPress version: 5.8.1
  • First release: Oct 1, 2014
  • Latest release: Aug 19, 2021
  • Number of updates: 43
  • Update frequency: every 59.7 days
  • Top authors: Cart2Cart (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

60+ active / 2,913 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼146.95ms] Passed 4 tests

A check of server-side resources used by Cart2Cart: BigCommerce to WooCommerce Migration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.03 ▲6.59
Dashboard /wp-admin3.09 ▲0.0343.66 ▼9.90
Posts /wp-admin/edit.php3.14 ▲0.0345.83 ▼3.64
Add New Post /wp-admin/post-new.php5.44 ▲0.0189.92 ▼575.07
Media Library /wp-admin/upload.php3.03 ▲0.0334.24 ▲0.83
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help3.0528.70
Settings /wp-admin/admin.php?page=cart2cart-migration-settings3.0429.44
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services3.0327.52
How it works /wp-admin/admin.php?page=cart2cart-how-it-works3.0029.88
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration3.0329.84

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 21 new files
Database: 1 new table, no new options
New tables
wp_c2c_config

Browser metrics Passed 4 tests

Cart2Cart: BigCommerce to WooCommerce Migration: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,746 ▲15015.80 ▲0.287.63 ▼3.0750.15 ▲3.15
Dashboard /wp-admin3,003 ▲695.90 ▼0.05126.91 ▼34.39135.00 ▲15.10
Posts /wp-admin/edit.php2,800 ▲612.69 ▲0.0160.76 ▼13.8193.35 ▼6.80
Add New Post /wp-admin/post-new.php1,643 ▼4021.65 ▲2.95280.06 ▼63.38103.86 ▼1.86
Media Library /wp-admin/upload.php1,797 ▼75.01 ▼0.02129.37 ▼23.99138.04 ▲13.82
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help1,4005.05119.9987.52
Settings /wp-admin/admin.php?page=cart2cart-migration-settings1,0742.1451.0258.15
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services1,5345.50149.1068.72
How it works /wp-admin/admin.php?page=cart2cart-how-it-works1,4557.45172.80107.27
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration1,8308.41204.49100.85

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 successfully, without leaving any zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/cart2cart-bigcommerce-to-woocommerce-migration/bridge2cart/bridge.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Cart2cart\\plugin_dir_path() in wp-content/plugins/cart2cart-bigcommerce-to-woocommerce-migration/class/AutoLoad.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=cart2cart-migration-help
    • > Javascript (severe) in unknown
    https://woocommerce.app.shopping-cart-migration.com/module/woocommerce/help-and-faqs 63:2 Uncaught SyntaxError: Unexpected token '}'
    • > GET request to /wp-admin/admin.php?page=cart2cart-additional-services
    • > Javascript (severe) in unknown
    https://woocommerce.app.shopping-cart-migration.com/module/woocommerce/additional-services 63:2 Uncaught SyntaxError: Unexpected token '}'
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cart2cart-how-it-works
    • > Console-api (warning) in unknown
    https://static.hotjar.com/c/hotjar-2264794.js?sv=7 2:1244 "Hotjar not launching due to suspicious userAgent:" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/95.0.4638.69 Safari/537.36"
    • > GET request to /wp-admin/admin.php?page=cart2cart-how-it-works
    • > Javascript (severe) in unknown
    https://woocommerce.app.shopping-cart-migration.com/module/woocommerce/how-it-works/sourceId/Bigcommerce/targetId/Woocommerce 63:2 Uncaught SyntaxError: Unexpected token '}'
    • > GET request to /wp-admin/admin.php?page=cart2cart-migration
    • > Javascript (severe) in unknown
    https://woocommerce.app.shopping-cart-migration.com/from-bigcommerce-to-woocommerce/?storeUrl=http%3A%2F%2Fwp.com&storeAdminUrl=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php 79:2 Uncaught SyntaxError: Unexpected token '}'
    • > GET request to /wp-admin/admin.php?page=cart2cart-migration
    • > Console-api (warning) in unknown
    https://d2wy8f7a9ursnm.cloudfront.net/bugsnag-3.min.js 0:3969 "Hotjar not launching due to suspicious userAgent:" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/95.0.4638.69 Safari/537.36"

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Contributors: The plugin contributors field is not present
  • Screenshots: Screenshot #8 (screenshot-8.png) image required
The official readme.txt might help

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

The entry point to "Cart2Cart: BigCommerce to WooCommerce Migration" version 2.0.0 is a PHP file that has certain tags in its header comment area
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 ("cart2cart-bigcommerce-to-woocommerce-migration.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)

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 detected4,949 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP141,1541,2724,931
CSS14018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity12.00
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity4.84
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes81
▷ Abstract classes00.00%
▷ Concrete classes81100.00%
▷ Final classes00.00%
Methods233
▷ Static methods146.01%
▷ Public methods18177.68%
▷ Protected methods4519.31%
▷ Private methods73.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants81
▷ Global constants3644.44%
▷ Class constants4555.56%
▷ 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%