79% gf-hubspot

Code Review | WP Gravity Forms HubSpot

WordPress plugin WP Gravity Forms HubSpot scored79%from 54 tests.

About plugin

  • Plugin page: gf-hubspot
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: Aug 10, 2023
  • Number of updates: 36
  • Update frequency: every 43.7 days
  • Top authors: CRMPerks (88.89%)asif876 (13.89%)

Code review

54 tests

User reviews

11 reviews

Install metrics

700+ active /10,627 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.38MB] [CPU: ▲0.15ms] Passed 4 tests

Analyzing server-side resources used by WP Gravity Forms HubSpot
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3742.31 ▲1.78
Dashboard /wp-admin3.73 ▲0.4355.88 ▲6.18
Posts /wp-admin/edit.php3.78 ▲0.4354.59 ▲2.78
Add New Post /wp-admin/post-new.php6.25 ▲0.3687.84 ▼7.76
Media Library /wp-admin/upload.php3.58 ▲0.3640.52 ▲3.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 48 new files
Database: 3 new tables, 7 new options
New tables
wp_vxg_hubspot
wp_vxg_hubspot_log
wp_vxg_hubspot_accounts
New WordPress options
widget_recent-posts
vxg_hubspot_pro_version
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Gravity Forms HubSpot
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.27 ▲0.131.83 ▼0.4939.26 ▼5.93
Dashboard /wp-admin2,217 ▲375.55 ▼0.0986.31 ▼8.3539.41 ▼3.17
Posts /wp-admin/edit.php2,126 ▲231.98 ▼0.0341.45 ▲2.8437.39 ▲3.36
Add New Post /wp-admin/post-new.php1,544 ▲1823.04 ▼0.08692.68 ▲8.5356.49 ▲4.72
Media Library /wp-admin/upload.php1,425 ▲254.23 ▲0.00101.26 ▼6.2144.60 ▼1.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables detected upon uninstall: 3 tables
    • wp_vxg_hubspot
    • wp_vxg_hubspot_log
    • wp_vxg_hubspot_accounts
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • vxg_hubspot_pro_version
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% 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
5 plugin tags: gravity forms hubspot, hubspot gravity forms integration, gravity forms, hubspot, gravity forms hubspot addon

gf-hubspot/gf-hubspot.php 92% from 13 tests

"WP Gravity Forms HubSpot" version 1.1.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin7,743 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP207819707,737
JavaScript2105
CSS1001

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 149)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity141.50
▷ Minimum class complexity6.00
▷ Maximum class complexity355.00
Average method complexity7.11
▷ Minimum method complexity1.00
▷ Maximum method complexity149.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods184
▷ Static methods31.63%
▷ Public methods17494.57%
▷ Protected methods00.00%
▷ Private methods105.43%
Functions0
▷ Named functions00.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
23 PNG files occupy 0.20MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/premium/email-lookup.png9.60KB9.48KB▼ 1.30%
images/premium/browsing-history.png22.90KB8.62KB▼ 62.34%
images/premium/analytics.png9.57KB9.77KB0.00%
images/active0.png0.22KB0.18KB▼ 16.67%
images/updated.png1.53KB0.50KB▼ 67.37%