77% ht-contactform

Code Review | Contact Form 7 Widget For Elementor Page Builder & Gutenberg Blocks

WordPress plugin Contact Form 7 Widget For Elementor Page Builder & Gutenberg Blocks scored77%from 54 tests.

About plugin

  • Plugin page: ht-contactform
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 3, 2019
  • Latest release: Oct 23, 2023
  • Number of updates: 34
  • Update frequency: every 49.9 days
  • Top authors: htplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10,000+ active /123,085 total downloads

Benchmarks

Plugin footprint 82% 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.16MB] [CPU: ▼6.95ms] 75% from 4 tests

This is a short check of server-side resources used by Contact Form 7 Widget For Elementor Page Builder & Gutenberg Blocks
It is recommended to improve the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,434.22ms on /wp-admin/admin.php?page=ht-contactform_extensions)
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1532.91 ▼6.67
Dashboard /wp-admin3.47 ▲0.1646.46 ▼7.42
Posts /wp-admin/edit.php3.58 ▲0.2245.22 ▼0.98
Add New Post /wp-admin/post-new.php6.07 ▲0.1882.77 ▼12.73
Media Library /wp-admin/upload.php3.39 ▲0.1637.02 ▲2.16
HT Contact Form /wp-admin/admin.php?page=htcontact-form3.3633.83
Recommendations /wp-admin/admin.php?page=ht-contactform_extensions7.671,434.22

Server storage [IO: ▲0.27MB] [DB: ▲0.67MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 Widget For Elementor Page Builder & Gutenberg Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.55 ▼0.011.59 ▼0.0039.20 ▲0.25
Dashboard /wp-admin2,231 ▲545.66 ▼0.0084.17 ▼1.9244.59 ▲3.45
Posts /wp-admin/edit.php2,158 ▲552.41 ▲0.4137.86 ▲0.3733.65 ▲0.45
Add New Post /wp-admin/post-new.php1,567 ▲4123.04 ▼0.01661.85 ▲9.9264.95 ▲2.38
Media Library /wp-admin/upload.php1,448 ▲454.36 ▲0.1997.41 ▲3.4748.26 ▲4.89
HT Contact Form /wp-admin/admin.php?page=htcontact-form9872.2328.1232.41
Recommendations /wp-admin/admin.php?page=ht-contactform_extensions2,8342.3633.9067.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=htcontact-form
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ht-contactform/include/dashboard.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function HtContactForm\\Block\\add_action() in wp-content/plugins/ht-contactform/blocks/block-init.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/ht-contactform/index.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #4, #5, #6, #7 in ht-contactform/assets to your readme.txt
The official readme.txt might help

ht-contactform/contact-form-widget-elementor.php 85% from 13 tests

"Contact Form 7 Widget For Elementor Page Builder & Gutenberg Blocks" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ht-contactform.php" instead of "contact-form-widget-elementor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected2,343 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP92751631,714
JSON100216
JavaScript35750209
CSS22712204

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity26.25
▷ Minimum class complexity4.00
▷ Maximum class complexity53.00
Average method complexity4.06
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2781.82%
▷ Protected methods26.06%
▷ Private methods412.12%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 PNG files occupy 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon/white-plus.png1.06KB0.14KB▼ 87.00%
assets/images/icon/rating.png3.91KB1.85KB▼ 52.56%
assets/images/extensions/woolentor-addons-pro.png3.20KB1.69KB▼ 47.09%
assets/images/extensions/whols-pro.png15.30KB7.40KB▼ 51.65%
(invalid) assets/images/extensions/ht-menu.png2.85KB0.00KB▼ 100.00%