78% hdforms

Code Review | HDForms | Contact Form Builder

WordPress plugin HDForms | Contact Form Builder scored78%from 54 tests.

About plugin

  • Plugin page: hdforms
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2018
  • Latest release: Nov 24, 2023
  • Number of updates: 22
  • Update frequency: every 84.6 days
  • Top authors: Harmonic_Design (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,932 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.14MB] [CPU: ▼6.96ms] Passed 4 tests

A check of server-side resources used by HDForms | Contact Form Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1637.96 ▼6.36
Dashboard /wp-admin3.46 ▲0.1148.31 ▼16.50
Posts /wp-admin/edit.php3.57 ▲0.2146.09 ▼6.02
Add New Post /wp-admin/post-new.php6.04 ▲0.15117.41 ▲21.52
Media Library /wp-admin/upload.php3.38 ▲0.1537.21 ▲1.06
All Items /wp-admin/edit.php?post_type=hdf_form3.4237.30
Add New /wp-admin/post-new.php?post_type=hdf_form3.4241.54
About / Options /wp-admin/edit.php?post_type=hdf_form&page=hdf_options3.3634.22

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
hdf_flood
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

HDForms | Contact Form Builder: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4614.72 ▲0.441.73 ▼0.1943.44 ▼0.30
Dashboard /wp-admin2,226 ▲465.63 ▼0.0585.73 ▼10.1738.44 ▼6.77
Posts /wp-admin/edit.php2,128 ▲282.00 ▼0.0038.56 ▼1.1833.71 ▼3.02
Add New Post /wp-admin/post-new.php6,386 ▲4,85727.86 ▲4.57814.84 ▲136.5058.62 ▲1.91
Media Library /wp-admin/upload.php1,428 ▲284.22 ▲0.0497.63 ▼6.5344.08 ▲1.10
All Items /wp-admin/edit.php?post_type=hdf_form1,1002.0334.4331.39
Add New /wp-admin/post-new.php?post_type=hdf_form1,3952.4551.8871.81
About / Options /wp-admin/edit.php?post_type=hdf_form&page=hdf_options9572.0023.8748.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • hdf_flood

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/hdforms/index.php
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/hdforms/includes/meta.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/hdforms/includes/about.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_status() in wp-content/plugins/hdforms/includes/template.php:3
    • > PHP Notice
      Undefined variable: form in wp-content/plugins/hdforms/includes/template.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hdforms/includes/functions.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hdforms/includes/post-type.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

hdforms/index.php 92% from 13 tests

The primary PHP file in "HDForms | Contact Form Builder" version 1.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hdforms.php" instead of "index.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
Good job! No executable or dangerous file extensions detected8,365 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
CSS52903,688
JavaScript52571973,678
PHP6173104999

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions54
▷ Named functions54100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin