68% makewebbetter-hubspot-for-woocommerce

Code Review | MWB HubSpot for WooCommerce - CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics

WordPress plugin MWB HubSpot for WooCommerce - CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics scored68%from 54 tests.

About plugin

  • Plugin page: makewebbetter-hub...
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2020
  • Latest release: Sep 22, 2023
  • Number of updates: 53
  • Update frequency: every 23.4 days
  • Top authors: makewebbetter (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

10,000+ active /253,644 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Analyzing server-side resources used by MWB HubSpot for WooCommerce - CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.92 ▼2.65
Dashboard /wp-admin3.31 ▲0.0046.43 ▲2.07
Posts /wp-admin/edit.php3.36 ▲0.0045.77 ▼8.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.51 ▼21.53
Media Library /wp-admin/upload.php3.23 ▲0.0032.10 ▼3.35

Server storage [IO: ▲1.58MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for MWB HubSpot for WooCommerce - CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.381.78 ▼0.2444.01 ▼3.20
Dashboard /wp-admin2,198 ▲245.62 ▲0.0991.70 ▼3.5341.28 ▼5.44
Posts /wp-admin/edit.php2,103 ▼12.00 ▼0.0139.78 ▼2.2335.89 ▼1.30
Add New Post /wp-admin/post-new.php1,526 ▼1123.61 ▲5.44591.28 ▼54.5651.98 ▼8.72
Media Library /wp-admin/upload.php1,397 ▼34.19 ▲0.0399.42 ▼9.3440.04 ▼3.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/makewebbetter-hubspot-for-woocommerce.php+293
    Use of undefined constant WC_LOG_DIR - assumed 'WC_LOG_DIR' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/makewebbetter-hubspot-for-woocommerce/admin/templates/deactivation-screen.php
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Hubwoo' not found in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/admin/templates/hubwoo-deals.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/includes/class-hubwoo-rfm-configuration.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/includes/class-hubwoo-rfm-configuration.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woocommerce_admin_fields() in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/admin/templates/hubwoo-abncart.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/admin/templates/hubwoo-add-ons.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Hubwoo' not found in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/admin/templates/hubwoo-logs.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Hubwoo' not found in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/admin/templates/setup/hubwoo-pipeline-setup.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/includes/class-hubwoo-rfm-configuration.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'HubWooContactProperties' not found in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/admin/templates/setup/hubwoo-grp-pr-setup.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'HubWooEnum' not found in wp-content/plugins/makewebbetter-hubspot-for-woocommerce/includes/class-hubwooconst.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

makewebbetter-hubspot-for-woocommerce/makewebbetter-hubspot-for-woocommerce.php Passed 13 tests

"MWB HubSpot for WooCommerce - CRM, Abandoned Cart, Email Marketing, Marketing Automation & Analytics" version 1.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
130 characters long description:
Integrate WooCommerce with HubSpot’s free CRM, abandoned cart tracking, email marketing, marketing automation, analytics & more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin23,549 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP413,6083,60316,154
CSS42651623,897
JavaScript3228262,189
PO File15646321,297
SVG30012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity78.87
▷ Minimum class complexity1.00
▷ Maximum class complexity338.00
Average method complexity5.48
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods391
▷ Static methods10927.88%
▷ Public methods37194.88%
▷ Protected methods00.00%
▷ Private methods205.12%
Functions29
▷ Named functions1344.83%
▷ Anonymous functions1655.17%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/hubspot-pricing.png74.21KB30.30KB▼ 59.17%
admin/images/checked.png2.19KB1.23KB▼ 43.79%
admin/images/contact.png0.81KB0.80KB▼ 1.44%
admin/images/deal.png0.87KB0.85KB▼ 2.24%