62% smarttouchinteractive-form-builder

Code Review | SmartTouch NextGen Form Builder

WordPress plugin SmartTouch NextGen Form Builder scored62%from 54 tests.

About plugin

  • Plugin page: smarttouchinterac...
  • Plugin version: 1.1.19
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 31, 2016
  • Latest release: Feb 28, 2019
  • Number of updates: 86
  • Update frequency: every 12.4 days
  • Top authors: ayushst (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,522 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.67MB] [CPU: ▼54.69ms] Passed 4 tests

Analyzing server-side resources used by SmartTouch NextGen Form Builder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.1510.30 ▼38.83
Dashboard /wp-admin2.34 ▼0.9713.28 ▼41.77
Posts /wp-admin/edit.php2.34 ▼1.0210.81 ▼42.84
Add New Post /wp-admin/post-new.php2.34 ▼3.5510.84 ▼95.33
Media Library /wp-admin/upload.php2.34 ▼0.8911.98 ▼27.90
Add Header Footer /wp-admin/admin.php?page=sti-header-footer2.3412.32
Form Login /wp-admin/admin.php?page=smart-touch-form-builder2.3411.35

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 75 new files
Database: 4 new tables, 9 new options
New tables
wp_smarttouch_form_builder_entries
wp_smarttouch_form_builder_forms
wp_smarttouch_form_builder_fields
wp_form_register
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_sti_widget
widget_theysaidso_widget
sti_db_version
widget_recent-comments
sti_dashboard_widget_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for SmartTouch NextGen Form Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13014.11 ▼0.2816.28 ▲14.3544.23 ▼2.70
Dashboard /wp-admin2,249 ▲725.58 ▼0.0882.12 ▼13.6781.43 ▲37.74
Posts /wp-admin/edit.php2,126 ▲261.98 ▼0.0436.47 ▼2.2537.88 ▲0.86
Add New Post /wp-admin/post-new.php1,562 ▲2523.19 ▲5.06674.39 ▲8.8854.30 ▼23.62
Media Library /wp-admin/upload.php1,426 ▲234.26 ▲0.0699.03 ▼10.7360.77 ▲15.37
Add Header Footer /wp-admin/admin.php?page=sti-header-footer1,2042.1531.6630.63
Form Login /wp-admin/admin.php?page=smart-touch-form-builder1,1972.3232.1630.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SmartTouchFormBuilder_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_sti_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in SmartTouchFormBuilder_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+398
    Undefined index: sti-entries
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > User notice in wp-includes/functions.php+5905
    Function wp_deregister_script was called incorrectly. Do not deregister the jquery script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
    • > GET request to /wp-admin/admin.php?page=sti-header-footer
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2484
    Undefined index: hf
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sti-header-footer
    • > Warning in wp-content/plugins/smarttouchinteractive-form-builder/includes/admin-header-footer.php+42
    fread(): Length parameter must be greater than 0
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2859
    Undefined index: username
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2860
    Undefined index: password
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2861
    Undefined index: apikey
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2887
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2889
    Undefined index: account_name
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Notice in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2921
    Undefined property: stdClass::$Accounts
    • > GET request to /wp-admin/admin.php?page=smart-touch-form-builder
    • > Warning in wp-content/plugins/smarttouchinteractive-form-builder/smart-touch-form-builder.php+2922
    count(): Parameter must be an array or an object that implements Countable

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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/smarttouchinteractive-form-builder/includes/hcptscript.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined index: adwords_ad_google in wp-content/plugins/smarttouchinteractive-form-builder/includes/fophp.php on line 9
    • > PHP Notice
      Undefined index: ad in wp-content/plugins/smarttouchinteractive-form-builder/includes/fophp.php on line 5
    • > PHP Notice
      Undefined index: ad in wp-content/plugins/smarttouchinteractive-form-builder/includes/fophp.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/smarttouchinteractive-form-builder/includes/fcptscript.php:3
    • > PHP Notice
      Undefined index: adwords_ad_google in wp-content/plugins/smarttouchinteractive-form-builder/includes/nextgen.php on line 5
    • > PHP Notice
      Undefined index: adwords_ad_google in wp-content/plugins/smarttouchinteractive-form-builder/includes/fophp.php on line 2
    • > PHP Notice
      Undefined index: adwords_ad_google in wp-content/plugins/smarttouchinteractive-form-builder/includes/nextgen.php on line 2
    • > PHP Notice
      Undefined index: ad in wp-content/plugins/smarttouchinteractive-form-builder/includes/nextgen.php on line 2
    • > PHP Notice
      Undefined index: ad in wp-content/plugins/smarttouchinteractive-form-builder/includes/fophp.php on line 2
    • > PHP Notice
      Undefined index: ad in wp-content/plugins/smarttouchinteractive-form-builder/includes/nextgen.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (SmartTouch NextGen Form Builder page for registeration with our CRM through REST with OAuth security2. Create Form by providing its intial name with redirection URL after sucessful submission of form by enduser through wordpress site2. Configuring field item options3. Form management screen4. Rendered form on a page through Short Code)
The official readme.txt is a good inspiration

smarttouchinteractive-form-builder/smart-touch-form-builder.php 92% from 13 tests

The main PHP script in "SmartTouch NextGen Form Builder" version 1.1.19 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smarttouchinteractive-form-builder.php" instead of "smart-touch-form-builder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin6,045 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,2406435,373
JavaScript811953440
CSS4365231
PO File1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity111.33
▷ Minimum class complexity6.00
▷ Maximum class complexity430.00
Average method complexity6.86
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods113
▷ Static methods21.77%
▷ Public methods113100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
28 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrows-2x.png1.76KB0.69KB▼ 60.52%
css/smoothness/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
css/smoothness/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
images/sti-interface-icons-2x.png3.91KB2.31KB▼ 40.83%