68% cartbox-messaging-widgets

Code Review | Cartbox – Abandoned Cart Recovery - Order Success Notifications – Message Notifications for Contact Form 7 - Click to Chat

WordPress plugin Cartbox – Abandoned Cart Recovery - Order Success Notifications – Message Notifications for Contact Form 7 - Click to Chat scored68%from 54 tests.

About plugin

  • Plugin page: cartbox-messaging...
  • Plugin version: 3.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2022
  • Latest release: Mar 16, 2023
  • Number of updates: 24
  • Update frequency: every 3.9 days
  • Top authors: cartboxmessaging (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /2,479 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼9.74ms] Passed 4 tests

This is a short check of server-side resources used by Cartbox – Abandoned Cart Recovery - Order Success Notifications – Message Notifications for Contact Form 7 - Click to Chat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1343.58 ▲1.29
Dashboard /wp-admin3.43 ▲0.0948.64 ▼21.44
Posts /wp-admin/edit.php3.54 ▲0.1949.16 ▲0.12
Add New Post /wp-admin/post-new.php6.01 ▲0.1286.16 ▼18.94
Media Library /wp-admin/upload.php3.35 ▲0.1240.09 ▲4.34
Abandoned Cart /wp-admin/admin.php?page=cbcart_abandoned_Cart3.4135.56
Click To Chat /wp-admin/admin.php?page=cbcart_clicktochat3.6739.95
CloudAPI Tutorial /wp-admin/admin.php?page=cbcart_tutorial3.4536.24
Settings /wp-admin/admin.php?page=cbcart_admin_settings_display3.4336.24
Dashboard /wp-admin/admin.php?page=cbcart_dashboard3.4329.92
Incoming Message /wp-admin/admin.php?page=cbcart_incoming_message3.3236.27
Mobile Capture /wp-admin/admin.php?page=cbcart_early_capture3.4534.81
Order Notification /wp-admin/admin.php?page=cbcart_ordernotification3.3233.59
Message Notification for CF7 /wp-admin/admin.php?page=cbcart_messages_cf3.3234.68

Server storage [IO: ▲3.52MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 89 new files
Database: 4 new tables, 8 new options
New tables
wp_cbcart_orderdetails
wp_cbcart_abandoneddetails
wp_cbcart_template
wp_cbcart_contactformdetails
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
cbcart_ordernotificationsettings
cbcart_chat_setting
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Cartbox – Abandoned Cart Recovery - Order Success Notifications – Message Notifications for Contact Form 7 - Click to Chat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲23213.63 ▼1.0510.31 ▲8.4739.75 ▼3.24
Dashboard /wp-admin2,253 ▲615.83 ▲0.84101.01 ▼10.2181.45 ▲36.83
Posts /wp-admin/edit.php2,133 ▲441.99 ▼0.0233.87 ▼2.9130.32 ▼5.81
Add New Post /wp-admin/post-new.php1,548 ▲1523.27 ▼0.03692.60 ▲23.6054.12 ▼5.65
Media Library /wp-admin/upload.php1,432 ▲414.12 ▼0.08106.87 ▲5.1946.67 ▲1.01
Abandoned Cart /wp-admin/admin.php?page=cbcart_abandoned_Cart8912.6735.4451.66
Click To Chat /wp-admin/admin.php?page=cbcart_clicktochat1,5092.4041.8524.72
CloudAPI Tutorial /wp-admin/admin.php?page=cbcart_tutorial1,1812.5332.5743.07
Settings /wp-admin/admin.php?page=cbcart_admin_settings_display1,0422.5832.7730.57
Dashboard /wp-admin/admin.php?page=cbcart_dashboard1,1802.5329.9832.91
Incoming Message /wp-admin/admin.php?page=cbcart_incoming_message1,0422.6232.8723.53
Mobile Capture /wp-admin/admin.php?page=cbcart_early_capture1,1482.5731.3653.66
Order Notification /wp-admin/admin.php?page=cbcart_ordernotification1,0422.5734.2123.38
Message Notification for CF7 /wp-admin/admin.php?page=cbcart_messages_cf1,0422.5533.2326.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=cbcart_abandoned_Cart
    • > Notice in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-setup-abandonedcart.php+43
    Undefined variable: cbcart_order_failed_amt
    • > GET request to /wp-admin/admin.php?page=cbcart_abandoned_Cart
    • > Notice in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-setup-abandonedcart.php+43
    Undefined variable: cbcart_order_failed1_amt

SRP 50% 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
Almost there! Just fix the following items
  • 49× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-incoming-message.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-startup.php:3
    • > PHP Warning
      Use of undefined constant CBCART_DIR - assumed 'CBCART_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-clicktochat.php on line 11
    • > PHP Warning
      Use of undefined constant cbcart_logonew_black - assumed 'cbcart_logonew_black' (this will throw an Error in a future version of PHP) in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-incoming-message.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-abandonedcart.php:3
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-customise-template.php on line 4
    • > PHP Warning
      Use of undefined constant CBCART_DOMAIN - assumed 'CBCART_DOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-clicktochat.php on line 10
    • > PHP Warning
      Use of undefined constant CBCART_DIR - assumed 'CBCART_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/cartbox-messaging-widgets/admin/partials/cbcart-admin-clicktochat.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/cartbox-messaging-widgets/cbcart.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 24 tag instead of maximum 10
The official readme.txt might help

cartbox-messaging-widgets/cbcart.php 92% from 13 tests

The entry point to "Cartbox – Abandoned Cart Recovery - Order Success Notifications – Message Notifications for Contact Form 7 - Click to Chat" version 3.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cartbox-messaging-widgets.php" instead of "cbcart.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin30,460 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
CSS72,5145213,901
PHP276101,00612,533
SVG1002,671
JavaScript111091571,355

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity80.14
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity7.84
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods81
▷ Static methods2632.10%
▷ Public methods7693.83%
▷ Protected methods00.00%
▷ Private methods56.17%
Functions23
▷ Named functions2086.96%
▷ Anonymous functions313.04%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
23 PNG files occupy 0.13MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/cbcart-icon-8.png2.20KB2.34KB0.00%
admin/images/cbcart-LogoNew-black.png15.46KB6.49KB▼ 58.04%
admin/images/cbcart-SmileyImgs.png9.72KB7.23KB▼ 25.56%
admin/images/cbcart-profile2.png2.47KB2.50KB0.00%
admin/images/cbcart-VectorArrow.png17.33KB5.44KB▼ 68.63%