83% cf7-user-to-hubspot-contacts

Code Review | Contact Form user to HubSpot Contacts

WordPress plugin Contact Form user to HubSpot Contacts scored83%from 54 tests.

About plugin

  • Plugin page: cf7-user-to-hubsp...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.8.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2021
  • Latest release: Sep 13, 2021
  • Number of updates: 4
  • Update frequency: every 15.3 days
  • Top authors: superpuperlesha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /353 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.16ms] Passed 4 tests

Analyzing server-side resources used by Contact Form user to HubSpot Contacts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.22 ▼6.12
Dashboard /wp-admin3.37 ▲0.0749.46 ▼7.94
Posts /wp-admin/edit.php3.48 ▲0.1351.89 ▲3.46
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.30 ▼12.91
Media Library /wp-admin/upload.php3.29 ▲0.0734.52 ▼1.68

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form user to HubSpot Contacts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.56 ▼0.811.67 ▼0.3841.91 ▼3.51
Dashboard /wp-admin2,207 ▲194.89 ▼0.96116.16 ▼3.7045.35 ▼3.84
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0036.73 ▲2.4435.16 ▼2.70
Add New Post /wp-admin/post-new.php1,537 ▲1222.96 ▼0.22645.01 ▼9.4559.22 ▲5.22
Media Library /wp-admin/upload.php1,389 ▲14.26 ▲0.0698.29 ▼10.8242.64 ▼2.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/cf7-user-to-hubspot-contacts/admin_menu.php:18

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Donate link: Invalid url: ""
  • Screenshots: Screenshot #1 (The plugin has a menu here.) image required
You can take inspiration from this readme.txt

cf7-user-to-hubspot-contacts/wm_cf7_userto_hubspot.php 85% from 13 tests

The main PHP script in "Contact Form user to HubSpot Contacts" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("cf7-user-to-hubspot-contacts.php" instead of "wm_cf7_userto_hubspot.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected494 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45824358
PO File25253136

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods990.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin