10% cartboss

Code Review | SMS Abandoned Cart Recovery ✦ CartBoss

WordPress plugin SMS Abandoned Cart Recovery ✦ CartBoss scored10%from 54 tests.

About plugin

  • Plugin page: cartboss
  • Plugin version: 4.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: May 28, 2021
  • Latest release: Aug 29, 2023
  • Number of updates: 72
  • Update frequency: every 11.4 days
  • Top authors: cartboss (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

800+ active /11,012 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/cartboss/classes/class-cartboss-utils.php+217
    Uncaught Error: Call to undefined function wc_coupons_enabled() in wp-content/plugins/cartboss/classes/class-cartboss-utils.php:217
    Stack trace:
    #0 wp-content/plugins/cartboss/includes/class-cartboss-activator.php(19): Cartboss_Utils::enable_coupons()
    #1 wp-content/plugins/cartboss/cartboss.php(57): Cartboss_Activator::activate()
    #2 wp-includes/class-wp-hook.php(310): activate_cartboss()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.00MB] [CPU: ▼8.27ms] Passed 4 tests

An overview of server-side resources used by SMS Abandoned Cart Recovery ✦ CartBoss
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.52 ▼1.46
Dashboard /wp-admin3.31 ▼0.0341.83 ▼21.62
Posts /wp-admin/edit.php3.36 ▲0.0144.37 ▼2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.53 ▼7.66
Media Library /wp-admin/upload.php3.23 ▲0.0033.71 ▼0.40

Server storage [IO: ▲1.90MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 404 new files
Database: 2 new tables, 19 new options
New tables
wp_cb_consumed_session_tokens
wp_cb_carts
New WordPress options
cb_marketing_checkbox_label
cb_api_key
widget_theysaidso_widget
cb_marketing_checkbox_enabled
db_upgraded
cb_latest_version
cb_is_valid_api_key
cb_ignored_roles
theysaidso_admin_options
cb_has_balance
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for SMS Abandoned Cart Recovery ✦ CartBoss
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.22 ▼1.534.62 ▲2.7943.54 ▲0.12
Dashboard /wp-admin2,206 ▲185.86 ▲0.01106.54 ▼10.7539.55 ▼2.94
Posts /wp-admin/edit.php2,089 ▼02.07 ▲0.0838.84 ▲2.7234.22 ▼2.62
Add New Post /wp-admin/post-new.php1,533 ▲423.27 ▲4.92649.23 ▲19.5750.76 ▼10.36
Media Library /wp-admin/upload.php1,388 ▼34.43 ▲0.2695.78 ▼4.6841.77 ▼2.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_cb_carts
    • wp_cb_consumed_session_tokens
  • Zombie WordPress options were found after uninstall: 19 options
    • cb_has_balance
    • widget_recent-comments
    • cb_balance
    • cb_cron_timestamp
    • cb_last_sync_at
    • cb_marketing_checkbox_enabled
    • cb_phone_on_top
    • theysaidso_admin_options
    • cb_ignored_roles
    • cb_last_ping_at
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cartboss/public/partials/cartboss-public-display.php
  • 147× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Serializer\\Encoder\\DecoderInterface' not found in wp-content/plugins/cartboss/vendor/symfony/serializer/Encoder/ContextAwareDecoderInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Serializer\\Exception\\UnexpectedValueException' not found in wp-content/plugins/cartboss/vendor/symfony/serializer/Exception/PartialDenormalizationException.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Uri\\IPv4Calculators\\IPv4Calculator' not found in wp-content/plugins/cartboss/vendor/league/uri-components/src/IPv4Calculators/GMPCalculator.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'League\\Uri\\Components\\Component' not found in wp-content/plugins/cartboss/vendor/league/uri-components/src/Components/Fragment.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Uri\\Contracts\\UriInterface' not found in wp-content/plugins/cartboss/vendor/league/uri/src/Uri.php:74
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface' not found in wp-content/plugins/cartboss/vendor/symfony/property-info/Extractor/PhpDocExtractor.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\String\\Inflector\\InflectorInterface' not found in wp-content/plugins/cartboss/vendor/symfony/string/Inflector/EnglishInflector.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\PropertyAccess\\Exception\\AccessException' not found in wp-content/plugins/cartboss/vendor/symfony/property-access/Exception/NoSuchIndexException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Serializer\ormalizer\\AbstractObjectNormalizer' not found in wp-content/plugins/cartboss/vendor/symfony/serializer/Normalizer/ObjectNormalizer.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Stringable' not found in wp-content/plugins/cartboss/vendor/symfony/polyfill-php80/PhpToken.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in cartboss/assets to your readme.txt
  • Requires php: Version format is invalid
The official readme.txt might help

cartboss/cartboss.php Passed 13 tests

The main file in "SMS Abandoned Cart Recovery ✦ CartBoss" v. 4.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
95 characters long description:
Send abandoned cart notifications, offer discounts and special offers - all with text messages.

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
Success! There were no dangerous files found in this plugin40,179 lines of code in 372 files:
LanguageFilesBlank linesComment linesLines of code
PHP3176,30212,32636,250
JSON20002,024
Markdown2151001,196
JavaScript78423475
XSD114094
CSS315773
YAML215064
SVG1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity13.74
▷ Minimum class complexity1.00
▷ Maximum class complexity173.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces41
Interfaces64
Traits5
Classes227
▷ Abstract classes135.73%
▷ Concrete classes21494.27%
▷ Final classes6530.37%
Methods1,859
▷ Static methods38620.76%
▷ Public methods1,54483.06%
▷ Protected methods552.96%
▷ Private methods26013.99%
Functions120
▷ Named functions8268.33%
▷ Anonymous functions3831.67%
Constants471
▷ Global constants142.97%
▷ Class constants45797.03%
▷ Public constants34575.49%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.11MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/logo.png46.33KB26.92KB▼ 41.90%
admin/assets/phone-on-top.png24.71KB12.73KB▼ 48.50%
admin/assets/marketing-consent.png40.87KB27.90KB▼ 31.72%