83% hubwoo-integration

Code Review | Integration with HubSpot for WooCommerce

WordPress plugin Integration with HubSpot for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: hubwoo-integration
  • Plugin version: 4.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3
  • WordPress version: 6.3.1
  • First release: Oct 28, 2017
  • Latest release: May 5, 2020
  • Number of updates: 110
  • Update frequency: every 8.4 days
  • Top authors: makewebbetter (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

200+ active /11,222 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.94ms] Passed 4 tests

Analyzing server-side resources used by Integration with HubSpot for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.77 ▼2.70
Dashboard /wp-admin3.31 ▼0.0449.12 ▼14.77
Posts /wp-admin/edit.php3.36 ▲0.0044.45 ▼5.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.00 ▼12.79
Media Library /wp-admin/upload.php3.23 ▲0.0035.85 ▲1.88

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Integration with HubSpot for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.05 ▼0.301.90 ▲0.0244.09 ▲4.49
Dashboard /wp-admin2,195 ▲185.59 ▼0.0794.27 ▼6.9242.33 ▲2.23
Posts /wp-admin/edit.php2,100 ▲31.96 ▼0.0234.53 ▼1.4835.28 ▲0.36
Add New Post /wp-admin/post-new.php1,526 ▼822.95 ▲4.69652.60 ▲34.6951.40 ▼17.48
Media Library /wp-admin/upload.php1,403 ▲34.39 ▲0.2499.25 ▲0.6245.49 ▲3.90

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hubwoo-integration/admin/templates/hubwoo_abncart.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hubwoo-integration/admin/templates/realtime-sync.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/hubwoo-integration/admin/templates/hubwoo_setup.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hubwoo-integration/admin/templates/hubwoo_overview.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hubwoo-integration/admin/templates/hubwoo_lists.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hubwoo-integration/admin/templates/hubwoo_ocs.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hubwoo-integration/admin/templates/error-management.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hubwoo-integration/includes/class-hubwoo-ajax-handler.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hubwoo-integration/admin/templates/hubwoo_deals.php:14
    • > PHP Fatal error
      Uncaught Error: Call to a member function is_oauth_success() on null in wp-content/plugins/hubwoo-integration/admin/templates/hubwoo_connect.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: woocommerce crm, hubspot woocommerce integration, marketing automation, hubspot, woocommerce...

hubwoo-integration/hubspot-woocommerce-integration.php 77% from 13 tests

The entry point to "Integration with HubSpot for WooCommerce" version 4.0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hubwoo-integration.php" instead of "hubspot-woocommerce-integration.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.4" instead of "4.4")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin4,668 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP258781,3762,702
CSS259681,213
PO File1181196442
JavaScript2115311

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.67
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods108
▷ Static methods1715.74%
▷ Public methods9285.19%
▷ Protected methods21.85%
▷ Private methods1412.96%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.14MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/email-icon.png2.29KB2.03KB▼ 11.48%
admin/images/lock.png0.48KB0.31KB▼ 36.16%
admin/images/skype_logo.png0.93KB0.96KB0.00%
admin/images/checked.png0.49KB0.42KB▼ 14.14%
admin/images/connected.png1.32KB1.07KB▼ 18.77%