72% happyforms

Code Review | Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms

WordPress plugin Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms scored72%from 54 tests.

About plugin

  • Plugin page: happyforms
  • Plugin version: 1.25.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 7, 2018
  • Latest release: Oct 27, 2023
  • Number of updates: 371
  • Update frequency: every 5.6 days
  • Top authors: thethemefoundry (66.85%)happyforms (33.42%)

Code review

54 tests

User reviews

428 reviews

Install metrics

30,000+ active /1,693,606 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.19MB] [CPU: ▲15.58ms] Passed 4 tests

Server-side resources used by Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.46 ▲2.0052.19 ▲12.35
Dashboard /wp-admin5.58 ▲2.2864.61 ▲16.59
Posts /wp-admin/edit.php5.63 ▲2.2677.64 ▲35.13
Add New Post /wp-admin/post-new.php8.20 ▲2.3198.50 ▲14.96
Media Library /wp-admin/upload.php5.46 ▲2.2354.24 ▲18.42
Export /wp-admin/admin.php?page=happyforms-export5.5758.51
All Forms /wp-admin/edit.php?post_type=happyform5.7760.17
Import /wp-admin/admin.php?page=happyforms-import5.4348.30
Forms /wp-admin/admin.php?page=happyforms5.3144.97
SubmissionsUpgrade /wp-admin/edit.php?post_type=happyforms-activity5.5049.37
CouponsUpgrade /wp-admin/admin.php?page=happyforms-coupons5.4350.01
IntegrationsUpgrade /wp-admin/admin.php?page=happyforms-integrations5.4351.32

Server storage [IO: ▲1.27MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 277 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_happyforms_widget
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
happyforms-tracking
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18315.84 ▲1.471.82 ▲0.2036.80 ▼7.02
Dashboard /wp-admin2,315 ▲1417.48 ▲1.82211.87 ▲116.5845.29 ▼1.52
Posts /wp-admin/edit.php2,246 ▲1436.32 ▲4.2966.69 ▲31.3039.07 ▲5.65
Add New Post /wp-admin/post-new.php6,445 ▲4,91727.58 ▲4.36863.57 ▲158.7139.87 ▼14.62
Media Library /wp-admin/upload.php1,614 ▲2118.39 ▲4.21126.06 ▲26.8646.59 ▲3.71
Export /wp-admin/admin.php?page=happyforms-export9905.8948.9727.01
All Forms /wp-admin/edit.php?post_type=happyform1,8776.8478.7848.56
Import /wp-admin/admin.php?page=happyforms-import9615.9350.6628.65
Add New /wp-admin/customize.php?return=http%3A%2F%2Fwp.com%2Fwp-admin%2Fedit.php%3Fpost_type%3Dhappyform&happyforms=1&form_id=0#build2,34612.90223.5332.83
Forms /wp-admin/admin.php?page=happyforms280.420.093.65
SubmissionsUpgrade /wp-admin/edit.php?post_type=happyforms-activity1,3406.8675.5233.18
CouponsUpgrade /wp-admin/admin.php?page=happyforms-coupons1,2747.0178.8533.19
SettingsUpgrade /wp-admin/admin.php?page=#settings280.420.103.46
IntegrationsUpgrade /wp-admin/admin.php?page=happyforms-integrations2,7386.9497.2249.22

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

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

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 fix the following
  • 13× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/happyforms/core/templates/admin-shortcode.php
    • > /wp-content/plugins/happyforms/core/templates/customize-controls/setup/group_end.php
    • > /wp-content/plugins/happyforms/core/templates/customize-controls/setup/radio.php
    • > /wp-content/plugins/happyforms/core/templates/customize-controls/setup/checkbox.php
    • > /wp-content/plugins/happyforms/core/templates/customize-controls/style/heading.php
    • > /wp-content/plugins/happyforms/core/templates/partials/happyforms-select.php
    • > /wp-content/plugins/happyforms/core/templates/customize-controls/setup/textarea.php
    • > /wp-content/plugins/happyforms/core/templates/customize-sidebar.php
    • > /wp-content/plugins/happyforms/core/templates/customize-controls/setup/group_start.php
    • > /wp-content/plugins/happyforms/core/templates/customize-controls/setup/buttongroup.php
  • 293× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: control in wp-content/plugins/happyforms/core/templates/customize-controls/setup/alert-email-subject.php on line 1
    • > PHP Notice
      Undefined variable: control in wp-content/plugins/happyforms/core/templates/customize-controls/style/divider.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/happyforms/core/templates/customize-controls/setup/buttongroup.php on line 1
    • > PHP Notice
      Undefined variable: control in wp-content/plugins/happyforms/core/templates/customize-controls/setup/buttongroup.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/happyforms/core/templates/customize-form-steps.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HappyForms_Form_Part' not found in wp-content/plugins/happyforms/core/classes/parts/class-part-number.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function happyforms_get_form_controller() in wp-content/plugins/happyforms/inc/templates/admin-export.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/happyforms/core/templates/customize-controls/setup/radio.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/happyforms/inc/templates/customize-controls/number_dummy.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/happyforms/inc/templates/customize-controls/panel_dummy.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/customize.php?return=http%3A%2F%2Fwp.com%2Fwp-admin%2Fedit.php%3Fpost_type%3Dhappyform&happyforms=1&form_id=0#build
    • > Security (warning) in unknown
    /?post_type=happyform&p=0&customize_changeset_uuid=ab420e6b-67ab-46c0-af14-1e90b15d9d1e&customize_theme=twentytwentyone&customize_messenger_channel=preview-0 - An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
    • > GET request to /wp-admin/admin.php?page=happyforms
    • > Network (severe)
    wp-admin/admin.php?page=happyforms - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=#settings
    • > Network (severe)
    wp-admin/admin.php?page=#settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in happyforms/assets to your readme.txt
  • Tags: Too many tags (46 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

happyforms/happyforms.php Passed 13 tests

The main PHP file in "Form builder to get in touch with visitors, grow your email list and collect payments — Happyforms" ver. 1.25.9 adds more information about the plugin and also serves as the entry point for this plugin
86 characters long description:
Form builder to get in touch with visitors, grow your email list and collect payments.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected24,565 lines of code in 261 files:
LanguageFilesBlank linesComment linesLines of code
PHP1743,3563,05514,412
JavaScript411,5263455,566
CSS139441724,554
SVG330033

PHP code Passed 2 tests

An short overview of 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 complexity14.71
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes66
▷ Abstract classes00.00%
▷ Concrete classes66100.00%
▷ Final classes00.00%
Methods622
▷ Static methods254.02%
▷ Public methods58794.37%
▷ Protected methods101.61%
▷ Private methods254.02%
Functions192
▷ Named functions17490.62%
▷ Anonymous functions189.38%
Constants19
▷ Global constants526.32%
▷ Class constants1473.68%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin