62% shopmagic-for-woocommerce

Code Review | Free Follow-Up Emails & Marketing Automation for WooCommerce - ShopMagic

WordPress plugin Free Follow-Up Emails & Marketing Automation for WooCommerce - ShopMagic scored62%from 54 tests.

About plugin

  • Plugin page: shopmagic-for-woo...
  • Plugin version: 4.2.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2016
  • Latest release: Nov 15, 2023
  • Number of updates: 340
  • Update frequency: every 7.7 days
  • Top authors: wpdesk (73.53%)handsomeapps (26.76%)

Code review

54 tests

User reviews

65 reviews

Install metrics

10,000+ active /370,657 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.63MB] [CPU: ▲12.39ms] Passed 4 tests

A check of server-side resources used by Free Follow-Up Emails & Marketing Automation for WooCommerce - ShopMagic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.16 ▲1.6961.57 ▲22.71
Dashboard /wp-admin4.94 ▲1.6065.38 ▼1.67
Posts /wp-admin/edit.php4.98 ▲1.6260.96 ▲14.31
Add New Post /wp-admin/post-new.php7.71 ▲1.82115.20 ▲14.21
Media Library /wp-admin/upload.php4.85 ▲1.6359.56 ▲27.93
WP Desk Tracker /wp-admin/admin.php?page=wpdesk_tracker4.7949.08
Deactivate plugin /wp-admin/admin.php?page=wpdesk_tracker_deactivate4.7948.49
Lists /wp-admin/edit.php?post_type=shopmagic_list4.9057.74
Scheduled Actions /wp-admin/tools.php?page=action-scheduler5.0363.65

Server storage [IO: ▲7.02MB] [DB: ▲0.03MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 1,688 new files
Database: 12 new tables, 13 new options
New tables
wp_shopmagic_automation_outcome_logs
wp_shopmagic_marketing_lists
wp_actionscheduler_logs
wp_actionscheduler_actions
wp_actionscheduler_claims
wp_shopmagic_optin_email
wp_shopmagic_tracked_emails
wp_shopmagic_guest_meta
wp_shopmagic_guest
wp_actionscheduler_groups
...
New WordPress options
shopmagic_subscribers_update_required
plugin_activation_shopmagic-for-woocommerce/shopMagic.php
widget_theysaidso_widget
shopmagic_db
can_compress_scripts
shopmagic_guest_conversion
schema-ActionScheduler_LoggerSchema
db_upgraded
widget_recent-posts
schema-ActionScheduler_StoreSchema
...

Browser metrics Passed 4 tests

A check of browser resources used by Free Follow-Up Emails & Marketing Automation for WooCommerce - ShopMagic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲20114.77 ▲0.431.84 ▲0.1443.37 ▲0.82
Dashboard /wp-admin2,335 ▲1575.60 ▼0.0686.56 ▼29.2886.05 ▲41.03
Posts /wp-admin/edit.php2,170 ▲672.03 ▼0.0440.82 ▲4.3335.01 ▼0.85
Add New Post /wp-admin/post-new.php1,570 ▲4422.88 ▼0.49690.39 ▼30.9362.18 ▲6.73
Media Library /wp-admin/upload.php1,470 ▲704.22 ▲0.03102.62 ▼12.1644.01 ▼2.82
WP Desk Tracker /wp-admin/admin.php?page=wpdesk_tracker9352.0028.0736.54
Start Here /wp-admin/admin.php?page=shopmagic-admin#/welcome1,64313.72354.45132.75
Marketing Lists /wp-admin/admin.php?page=shopmagic-admin#/marketing-lists1,2447.93147.9649.46
Guests /wp-admin/admin.php?page=shopmagic-admin#/guests1,47310.78109.8944.18
Deactivate plugin /wp-admin/admin.php?page=wpdesk_tracker_deactivate9781.5526.7027.17
Logs /wp-admin/admin.php?page=shopmagic-admin#/logs/outcomes1,2928.24112.4459.39
Automations /wp-admin/admin.php?page=shopmagic-admin#/automations1,3098.74111.5746.03
Lists /wp-admin/edit.php?post_type=shopmagic_list1,1301.9836.4130.18
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,3151.8131.0233.63
Settings /wp-admin/admin.php?page=shopmagic-admin#/settings1,2459.66107.2233.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie tables detected upon uninstall: 12 tables
    • wp_shopmagic_guest
    • wp_actionscheduler_actions
    • wp_actionscheduler_logs
    • wp_shopmagic_automation_outcome
    • wp_shopmagic_marketing_lists
    • wp_shopmagic_tracked_emails_clicks
    • wp_actionscheduler_groups
    • wp_actionscheduler_claims
    • wp_shopmagic_tracked_emails
    • wp_shopmagic_automation_outcome_logs
    • ...
  • Zombie WordPress options were found after uninstall: 14 options
    • shopmagic_guest_conversion
    • widget_theysaidso_widget
    • widget_recent-posts
    • schema-ActionScheduler_LoggerSchema
    • schema-ActionScheduler_StoreSchema
    • plugin_activation_shopmagic-for-woocommerce/shopMagic.php
    • can_compress_scripts
    • widget_recent-comments
    • action_scheduler_hybrid_store_demarkation
    • theysaidso_admin_options
    • ...

Smoke tests 25% 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)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpdesk_tracker_deactivate
    • > Notice in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker.php+279
    Undefined index: plugin
    • > GET request to /wp-admin/admin.php?page=wpdesk_tracker_deactivate
    • > Notice in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker.php+281
    Undefined index:
    • > GET request to /wp-admin/admin.php?page=wpdesk_tracker_deactivate
    • > Notice in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/class-wpdesk-tracker.php+281
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/shopmagic-for-woocommerce/templates/placeholder/products_ordered/grid_3_col.php
    • > /wp-content/plugins/shopmagic-for-woocommerce/templates/placeholder/products_ordered/unordered_list.php
    • > /wp-content/plugins/shopmagic-for-woocommerce/templates/internal/admin/beta_notice.php
    • > /wp-content/plugins/shopmagic-for-woocommerce/templates/placeholder/products_ordered/grid_2_col.php
    • > /wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/wpdesk/wp-forms/templates/form-end.php
  • 907× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicVendor\\Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schema' not found in wp-content/plugins/shopmagic-for-woocommerce/vendor/woocommerce/action-scheduler/classes/schema/ActionScheduler_LoggerSchema.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicVendor\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/php-di/php-di/src/Invoker/FactoryParameterResolver.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/wpdesk/wp-forms/templates/form-start.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicVendor\\DI\\Definition\\Definition' not found in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/php-di/php-di/src/Definition/ArrayDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicVendor\\WPDesk\\Forms\\Validator' not found in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/wpdesk/wp-forms/src/Validator/ChainValidator.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ShopMagicVendor\\Symfony\\Component\\CssSelector\ode\\AbstractNode' not found in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/symfony/css-selector/Node/ElementNode.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'WPDesk\\ShopMagic\\Modules\\Mulitilingual\\LanguageHandler' not found in wp-content/plugins/shopmagic-for-woocommerce/src/Modules/Mulitilingual/Integration/BareHandler.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopMagicVendor\\WPDesk\\PluginBuilder\\Plugin\\Hookable' not found in wp-content/plugins/shopmagic-for-woocommerce/vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/PSR/WPDesk/Tracker/OptOut.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'WPDesk\\ShopMagic\\Customer\\CustomerProvider' not found in wp-content/plugins/shopmagic-for-woocommerce/src/Integration/ContactForms/Interceptor.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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: woocommerce mailchimp, customize woocommerce emails, follow up emails, woocommerce abandoned cart, woocommerce email customizer

shopmagic-for-woocommerce/shopMagic.php 92% from 13 tests

The main file in "Free Follow-Up Emails & Marketing Automation for WooCommerce - ShopMagic" v. 4.2.3 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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shopmagic-for-woocommerce.php" instead of "shopMagic.php")

Code Analysis 97% from 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 detected90,352 lines of code in 1,652 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,3869,44036,45766,299
JSON681608,632
Vuejs Component87388165,749
TypeScript864601795,249
JavaScript821224,089
CSS8306178
Markdown6360103
SVG20028
PO File13325

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 210)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.87
▷ Minimum class complexity1.00
▷ Maximum class complexity303.00
Average method complexity2.09
▷ Minimum method complexity1.00
▷ Maximum method complexity210.00
Code structure
Namespaces236
Interfaces195
Traits29
Classes1,080
▷ Abstract classes837.69%
▷ Concrete classes99792.31%
▷ Final classes28328.39%
Methods6,210
▷ Static methods3725.99%
▷ Public methods5,16683.19%
▷ Protected methods4937.94%
▷ Private methods5518.87%
Functions360
▷ Named functions8924.72%
▷ Anonymous functions27175.28%
Constants469
▷ Global constants51.07%
▷ Class constants46498.93%
▷ Public constants32670.26%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
18 PNG files occupy 0.28MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/src/assets/filter-pl.png11.63KB4.15KB▼ 64.34%
dist/admin/filter.png9.56KB4.53KB▼ 52.67%
assets/admin/src/assets/action.png11.45KB5.04KB▼ 55.94%
dist/admin/event-pl.png23.45KB7.85KB▼ 66.50%
vendor_prefixed/wpdesk/wp-wpdesk-tracker/src/assets/images/flexibleshipping.com.png5.63KB3.68KB▼ 34.58%