84% klyp-contact-form-7-to-hubspot

Code Review | Klyp CF7 to Hubspot

WordPress plugin Klyp CF7 to Hubspot scored 84% from 54 tests.

About plugin

  • Plugin page: klyp-contact-form...
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2020
  • Latest release: Mar 24, 2021
  • Number of updates: 21
  • Update frequency: every 4.9 days
  • Top authors: klyp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 607 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.23ms] Passed 4 tests

Server-side resources used by Klyp CF7 to Hubspot
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1133.69 ▼7.25
Dashboard /wp-admin3.41 ▲0.1146.66 ▼3.31
Posts /wp-admin/edit.php3.53 ▲0.1741.71 ▼5.10
Add New Post /wp-admin/post-new.php5.99 ▲0.1192.61 ▲2.83
Media Library /wp-admin/upload.php3.34 ▲0.1138.06 ▲2.73
Klyp CF7 to Hubspot /wp-admin/options-general.php?page=klyp-cf7-to-hubspot3.3030.22

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Klyp CF7 to Hubspot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.31 ▼1.071.59 ▼0.2436.99 ▼3.13
Dashboard /wp-admin2,207 ▲255.00 ▲0.11113.51 ▲9.6544.43 ▼3.53
Posts /wp-admin/edit.php2,093 ▲72.03 ▲0.0337.17 ▼0.7836.38 ▲0.85
Add New Post /wp-admin/post-new.php1,537 ▲1822.98 ▼0.04641.34 ▼30.7564.10 ▲2.36
Media Library /wp-admin/upload.php1,392 ▲44.25 ▲0.12114.66 ▼4.3948.33 ▼1.88
Klyp CF7 to Hubspot /wp-admin/options-general.php?page=klyp-cf7-to-hubspot8222.0625.6531.35

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
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/klyp-contact-form-7-to-hubspot/klyp-cf7-to-hubspot.php
    • > /wp-content/plugins/klyp-contact-form-7-to-hubspot/inc/settings-page.php
    • > /wp-content/plugins/klyp-contact-form-7-to-hubspot/inc/settings.php
    • > /wp-content/plugins/klyp-contact-form-7-to-hubspot/inc/hubspot.php
    • > /wp-content/plugins/klyp-contact-form-7-to-hubspot/inc/cf7.php
    • > /wp-content/plugins/klyp-contact-form-7-to-hubspot/inc/hubspot-api.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: hubspot, contact, cf7, form

klyp-contact-form-7-to-hubspot/klyp-cf7-to-hubspot.php 92% from 13 tests

The primary PHP file in "Klyp CF7 to Hubspot" version 1.0.7 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("klyp-contact-form-7-to-hubspot.php" instead of "klyp-cf7-to-hubspot.php")

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 plugin858 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7147111777
JSON10033
JavaScript13028
Markdown18020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity23.00
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods211.11%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG files were detected