10% wc-hub

Code Review | Integrator For HubSpot

WordPress plugin Integrator For HubSpot scored10%from 54 tests.

About plugin

  • Plugin page: wc-hub
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.0.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2021
  • Latest release: Sep 22, 2022
  • Number of updates: 6
  • Update frequency: every 66.8 days
  • Top authors: kerkness (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /832 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

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

Analyzing server-side resources used by Integrator For HubSpot
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.48 ▼0.71
Dashboard /wp-admin3.32 ▲0.0248.74 ▲4.87
Posts /wp-admin/edit.php3.37 ▲0.0145.85 ▼6.65
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.25 ▼10.83
Media Library /wp-admin/upload.php3.24 ▲0.0133.75 ▲1.43
WCHub /wp-admin/options-general.php?page=wc-hub-options-page3.2128.45

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Integrator For HubSpot
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.35 ▼1.023.32 ▲1.3846.61 ▲4.36
Dashboard /wp-admin2,207 ▲165.83 ▼0.0598.19 ▼5.8639.13 ▼4.27
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0333.46 ▼8.7636.35 ▲1.49
Add New Post /wp-admin/post-new.php1,517 ▼1717.50 ▼5.69605.41 ▼72.4647.98 ▼8.14
Media Library /wp-admin/upload.php1,389 ▼24.16 ▼0.0895.82 ▼7.0142.12 ▼0.79
WCHub /wp-admin/options-general.php?page=wc-hub-options-page7922.0623.9525.98

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1022× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Cms\\Hubdb\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Cms/Hubdb/Model/HubDbTableRowV3.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Cms\\Blogs\\BlogPosts\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Cms/Blogs/BlogPosts/Model/Styles.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Crm\\Imports\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Crm/Imports/Model/ForwardPaging.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-hub/lib/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Crm\\Deals\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Crm/Deals/Model/BatchInputSimplePublicObjectInput.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Crm\\Associations\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Crm/Associations/Model/StandardError.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Crm\\Objects\\FeedbackSubmissions\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Crm/Objects/FeedbackSubmissions/Model/SimplePublicObjectInput.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Crm\\Contacts\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Crm/Contacts/Model/SimplePublicObjectBatchInput.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Crm\\Properties\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Crm/Properties/Model/PropertyCreate.php:45
    • > PHP Fatal error
      Uncaught Error: Interface 'HubSpot\\Client\\Cms\\Domains\\Model\\ModelInterface' not found in wp-content/plugins/wc-hub/lib/hubspot/api-client/codegen/Cms/Domains/Model/ErrorDetail.php:45

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: crm, customers, woocommerce, hubspot

wc-hub/wc-hub.php 85% from 13 tests

The entry point to "Integrator For HubSpot" version 1.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("7.0" instead of "7.2")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin319,831 lines of code in 1,512 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,47361,770260,763314,655
Markdown171,37404,032
JSON14001,040
YAML614072
XML12023
make1409

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity18.53
▷ Minimum class complexity1.00
▷ Maximum class complexity744.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces264
Interfaces71
Traits4
Classes1,382
▷ Abstract classes20.14%
▷ Concrete classes1,38099.86%
▷ Final classes342.46%
Methods27,154
▷ Static methods5,26319.38%
▷ Public methods26,80098.70%
▷ Protected methods1540.57%
▷ Private methods2000.74%
Functions1,595
▷ Named functions412.57%
▷ Anonymous functions1,55497.43%
Constants12,773
▷ Global constants00.00%
▷ Class constants12,773100.00%
▷ Public constants12,76299.91%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected