83% cart2cart-universal-store-migration-app

Code Review | Cart2Cart Universal Migration App

WordPress plugin Cart2Cart Universal Migration App scored83%from 54 tests.

About plugin

  • Plugin page: cart2cart-univers...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.2-6.0
  • WordPress version: 6.3.1
  • First release: Oct 31, 2022
  • Latest release: May 4, 2023
  • Number of updates: 11
  • Update frequency: every 17.0 days
  • Top authors: Cart2Cart (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /2,788 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.99ms] Passed 4 tests

This is a short check of server-side resources used by Cart2Cart Universal Migration App
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.91 ▼2.00
Dashboard /wp-admin3.41 ▲0.1144.72 ▼1.94
Posts /wp-admin/edit.php3.53 ▲0.1748.87 ▲2.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.96 ▼6.69
Media Library /wp-admin/upload.php3.34 ▲0.1136.29 ▼1.33
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services3.3530.97
How it works /wp-admin/admin.php?page=cart2cart-how-it-works3.3431.08
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration3.3429.79
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help3.3427.79

Server storage [IO: ▲0.73MB] [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: 36 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Cart2Cart Universal Migration App
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.24 ▼1.131.60 ▼0.1039.69 ▼2.22
Dashboard /wp-admin2,239 ▲544.93 ▼0.9298.20 ▼3.7975.58 ▲32.90
Posts /wp-admin/edit.php2,122 ▲332.02 ▲0.0238.53 ▲2.0034.85 ▲3.03
Add New Post /wp-admin/post-new.php1,542 ▲2017.69 ▼5.53647.08 ▼6.1156.46 ▲5.88
Media Library /wp-admin/upload.php1,421 ▲334.17 ▼0.0896.46 ▼10.4970.17 ▲24.24
Additional Services /wp-admin/admin.php?page=cart2cart-additional-services1,0862.0325.06210.63
How it works /wp-admin/admin.php?page=cart2cart-how-it-works1,1371.9823.70113.69
Cart2Cart Migration /wp-admin/admin.php?page=cart2cart-migration1,1872.0225.33197.05
Live Chat & Help /wp-admin/admin.php?page=cart2cart-migration-help1,0152.1824.3081.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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 50% 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_filter() in wp-content/plugins/cart2cart-universal-store-migration-app/passwords/cart2cart-password-migration.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_filter() in wp-content/plugins/cart2cart-universal-store-migration-app/passwords/cart2cart-password-migration.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 your attention:
  • Screenshots: These screenshots require images: #7 (screenshot-7.png), #8 (screenshot-8.png)
  • Contributors: The plugin contributors field is missing
The official readme.txt might help

cart2cart-universal-store-migration-app/index.php 85% from 13 tests

The main PHP script in "Cart2Cart Universal Migration App" version 2.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 179 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("cart2cart-universal-store-migration-app.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,686 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS553193,560
PHP10137331,123
SVG1003

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity12.40
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods2793.10%
▷ Protected methods13.45%
▷ Private methods13.45%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants112.50%
▷ Class constants787.50%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.40MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/eyes.png0.76KB0.44KB▼ 41.83%
img/cost-migration.png16.45KB6.98KB▼ 57.57%
img/universal-migration.png23.78KB10.26KB▼ 56.84%
img/background.png134.27KB59.59KB▼ 55.62%
img/universal-app.png22.67KB9.80KB▼ 56.78%