83% gupshup-messaging-automation-for-woocommerce

Code Review | Gupshup Messaging Automation for WooCommerce

WordPress plugin Gupshup Messaging Automation for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: gupshup-messaging...
  • Plugin version: 2.2.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2023
  • Latest release: Sep 21, 2023
  • Number of updates: 29
  • Update frequency: every 6.2 days
  • Top authors: keshavgupshup (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /508 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.43MB] [CPU: ▲3.83ms] Passed 4 tests

Analyzing server-side resources used by Gupshup Messaging Automation for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4747.42 ▲4.50
Dashboard /wp-admin3.77 ▲0.4654.13 ▲2.25
Posts /wp-admin/edit.php3.82 ▲0.4656.12 ▲3.69
Add New Post /wp-admin/post-new.php6.30 ▲0.42104.27 ▲14.02
Media Library /wp-admin/upload.php3.63 ▲0.4041.28 ▲4.88
Workflow /wp-admin/admin.php?page=template-gupshup-gs-workflow-admin3.6143.68
Dashboard /wp-admin/admin.php?page=gupshup_gs_plugin3.6036.97
Settings /wp-admin/admin.php?page=gupshup_gs_plugin_setting3.6035.99

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 35 new files
Database: 4 new tables, 8 new options
New tables
wp_gupshup_gs_workflow_log
wp_gupshup_gs_abandoned_cart
wp_gupshup_gs_workflow
wp_gupshup_gs_action
New WordPress options
widget_recent-comments
gupshup_wp_uuid
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
gupshup_plugin_version
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Gupshup Messaging Automation for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲13913.88 ▼0.802.02 ▼0.0644.21 ▲1.88
Dashboard /wp-admin2,251 ▲605.54 ▼0.36102.01 ▼4.0182.22 ▲38.95
Posts /wp-admin/edit.php2,152 ▲662.60 ▲0.5837.87 ▲1.4133.92 ▼3.75
Add New Post /wp-admin/post-new.php1,565 ▲3223.47 ▲0.28712.28 ▲6.9436.21 ▼21.43
Media Library /wp-admin/upload.php1,439 ▲514.85 ▲0.64106.65 ▲1.9684.44 ▲37.29
Workflow /wp-admin/admin.php?page=template-gupshup-gs-workflow-admin8392.2227.3326.50
Dashboard /wp-admin/admin.php?page=gupshup_gs_plugin8372.2125.6122.89
Settings /wp-admin/admin.php?page=gupshup_gs_plugin_setting8392.2227.1824.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • gupshup_wp_uuid
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gupshup-messaging-automation-for-woocommerce/admin/Base/class-gupshup-gs-run-workflow.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Create a workflow), #2 (Manage workflow screen), #3 (Connect your WhatsApp account), #4 (Connect your WhatsApp account), #5 (Message received)
Please take inspiration from this readme.txt

gupshup-messaging-automation-for-woocommerce/gupshup-gs-plugin.php 77% from 13 tests

The main file in "Gupshup Messaging Automation for WooCommerce" v. 2.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("gupshup-messaging-automation-for-woocommerce.php" instead of "gupshup-gs-plugin.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin4,174 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP264234793,133
JavaScript64015766
CSS120199
Markdown124052
SVG11024

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 110)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.00
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity110.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes210.00%
Methods133
▷ Static methods1914.29%
▷ Public methods13198.50%
▷ Protected methods10.75%
▷ Private methods10.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants25100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin