68% html-forms

Code Review | HTML Forms

WordPress plugin HTML Forms scored68%from 54 tests.

About plugin

  • Plugin page: html-forms
  • Plugin version: 1.3.28
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Oct 25, 2017
  • Latest release: Sep 19, 2023
  • Number of updates: 112
  • Update frequency: every 19.2 days
  • Top authors: DvanKooten (100%)

Code review

54 tests

User reviews

46 reviews

Install metrics

8,000+ active /118,511 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▲1.40ms] Passed 4 tests

This is a short check of server-side resources used by HTML Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2441.16 ▼0.16
Dashboard /wp-admin3.72 ▲0.4246.30 ▼1.58
Posts /wp-admin/edit.php3.77 ▲0.4249.52 ▲8.18
Add New Post /wp-admin/post-new.php6.25 ▲0.36112.77 ▲21.23
Media Library /wp-admin/upload.php3.58 ▲0.3636.91 ▼0.83
Add New /wp-admin/admin.php?page=html-forms-add-form3.5530.94
Settings /wp-admin/admin.php?page=html-forms-settings3.5633.94
All Forms /wp-admin/admin.php?page=html-forms3.6035.75
Premium /wp-admin/admin.php?page=html-forms-premium3.5531.58

Server storage [IO: ▲0.47MB] [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: 52 new files
Database: 1 new table, 8 new options
New tables
wp_hf_submissions
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
hf_settings
widget_recent-comments
db_upgraded
widget_theysaidso_widget
hf_version

Browser metrics Passed 4 tests

HTML Forms: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10513.67 ▼0.711.71 ▼0.1743.07 ▲0.55
Dashboard /wp-admin2,257 ▲724.85 ▼0.96103.73 ▼0.0438.00 ▼2.88
Posts /wp-admin/edit.php2,141 ▲492.06 ▲0.0540.56 ▲0.2534.76 ▼0.98
Add New Post /wp-admin/post-new.php6,382 ▲4,85427.86 ▲9.53893.78 ▲274.4964.23 ▲13.33
Media Library /wp-admin/upload.php1,437 ▲464.17 ▼0.0494.82 ▼5.9740.83 ▼0.01
Add New /wp-admin/admin.php?page=html-forms-add-form8772.3831.3929.63
Settings /wp-admin/admin.php?page=html-forms-settings9442.3631.3625.82
All Forms /wp-admin/admin.php?page=html-forms1,0062.2027.9025.99
Premium /wp-admin/admin.php?page=html-forms-premium8832.2326.4037.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_hf_submissions
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • hf_version
    • hf_settings
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/html-forms/views/admin-sidebar.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/html-forms/migrations/1.1.6-move-save-submissions-setting.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function HTML_Forms\\add_action() in wp-content/plugins/html-forms/html-forms.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/html-forms/views/tab-fields.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/html-forms/migrations/1.3.20-change-referer-url-column-type.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/html-forms/views/tab-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'HTML_Forms\\Actions\\Action' not found in wp-content/plugins/html-forms/src/actions/class-mailchimp.php:8
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/html-forms/views/tab-actions.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'HTML_Forms\\Actions\\Action' not found in wp-content/plugins/html-forms/src/actions/class-email.php:8
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/html-forms/migrations/1.3.20-change-referer-url-column-type.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_cap() on null in wp-content/plugins/html-forms/migrations/1.1.1-add-role-cap.php:4

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: htmlforms, contact form, form, forms, html form

html-forms/html-forms.php Passed 13 tests

The principal PHP file in "HTML Forms" v. 1.3.28 is loaded by WordPress automatically on each request
51 characters long description:
Not just another forms plugin. Simple and flexible.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,021 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP416599512,772
Markdown12100238
SVG1006
JavaScript3003
CSS2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.33
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods141
▷ Static methods2014.18%
▷ Public methods13293.62%
▷ Protected methods10.71%
▷ Private methods85.67%
Functions30
▷ Named functions2170.00%
▷ Anonymous functions930.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png1.58KB1.09KB▼ 30.63%