58% conversational-forms

Code Review | Conversational Forms for ChatBot

WordPress plugin Conversational Forms for ChatBot scored58%from 54 tests.

About plugin

  • Plugin page: conversational-forms
  • Plugin version: 1.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Sep 10, 2019
  • Latest release: Aug 9, 2023
  • Number of updates: 26
  • Update frequency: every 55.0 days
  • Top authors: quantumcloud (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

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

Server metrics [RAM: ▼0.25MB] [CPU: ▼8.79ms] Passed 4 tests

Analyzing server-side resources used by Conversational Forms for ChatBot
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4353.49 ▲12.07
Dashboard /wp-admin3.71 ▲0.4165.59 ▲8.95
Posts /wp-admin/edit.php3.76 ▲0.4163.86 ▲7.36
Add New Post /wp-admin/post-new.php3.71 ▼2.1747.98 ▼61.56
Media Library /wp-admin/upload.php3.57 ▲0.3444.09 ▲10.09
Chatbot Form Builder /wp-admin/admin.php?page=qcformbuilder-forms3.6857.92

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,888 new files
Database: 6 new tables, 10 new options
New tables
wp_wfb_form_entry_meta
wp_wfb_queue_failures
wp_wfb_form_entries
wp_wfb_forms
wp_wfb_queue_jobs
wp_wfb_form_entry_values
New WordPress options
widget_qcformbuilder_forms_widget
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
WFB_DB
_qcformbuilderforms_lastupdate
_qcformbuilder_forms_styleincludes
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Conversational Forms for ChatBot
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6114.37 ▲0.081.66 ▼0.1635.34 ▼12.20
Dashboard /wp-admin2,228 ▲485.63 ▲0.0386.80 ▼15.0240.74 ▼1.45
Posts /wp-admin/edit.php2,136 ▲362.01 ▲0.0236.49 ▲0.0139.60 ▲2.74
Add New Post /wp-admin/post-new.php1,531 ▲328.52 ▲5.40700.49 ▼5.5129.23 ▼30.65
Media Library /wp-admin/upload.php1,430 ▲364.21 ▼0.0495.07 ▼13.2344.18 ▼0.70
Chatbot Form Builder /wp-admin/admin.php?page=qcformbuilder-forms1,27715.80234.9446.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall successfully, leaving 6 tables in the database
    • wp_wfb_form_entry_values
    • wp_wfb_form_entries
    • wp_wfb_queue_failures
    • wp_wfb_form_entry_meta
    • wp_wfb_queue_jobs
    • wp_wfb_forms
  • Zombie WordPress options were found after uninstall: 10 options
    • db_upgraded
    • widget_qcformbuilder_forms_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • _qcformbuilder_forms_styleincludes
    • theysaidso_admin_options
    • widget_recent-comments
    • WFB_DB
    • _qcformbuilderforms_lastupdate
    • widget_recent-posts

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
  • 37× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/conversational-forms/fields/credit_card_exp/preview.php
    • > /wp-content/plugins/conversational-forms/fields/paragraph/preview.php
    • > /wp-content/plugins/conversational-forms/fields/advanced_file/preview.php
    • > /wp-content/plugins/conversational-forms/fields/hidden/preview.php
    • > /wp-content/plugins/conversational-forms/fields/star-rate/preview.php
    • > /wp-content/plugins/conversational-forms/fields/button/preview.php
    • > /wp-content/plugins/conversational-forms/fields/number/preview.php
    • > /wp-content/plugins/conversational-forms/fields/phone/preview.php
    • > /wp-content/plugins/conversational-forms/fields/dropdown/preview.php
    • > /wp-content/plugins/conversational-forms/fields/color_picker/preview.php
  • 859× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/conversational-forms/fields/recaptcha/field.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/conversational-forms/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php:20
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/conversational-forms/fields/phone/field.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/conversational-forms/fields/html/config_template.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/conversational-forms/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/conversational-forms/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/conversational-forms/vendor/kylekatarnls/update-helper/src/UpdateHelper/ComposerPlugin.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/conversational-forms/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Inpsyde\\Wonolog\\HookListener\\FilterListenerInterface' not found in wp-content/plugins/conversational-forms/vendor/inpsyde/wonolog/src/HookListener/WpDieHandlerListener.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/conversational-forms/ui/emails/settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: wordpress form builder, booking form, form builder, forms, chatbot...

conversational-forms/qcformbuilder-core.php 85% from 13 tests

The main file in "Conversational Forms for ChatBot" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("conversational-forms.php" instead of "qcformbuilder-core.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/conversational-forms/vendor/nesbot/carbon/bin/upgrade-carbon.bat
163,714 lines of code in 1,643 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,17019,51842,55381,396
JavaScript2768,6388,28758,488
CSS5355215210,777
XSD499764,991
Markdown2993802,732
JSON23302,221
C118847879
SQL1039769
XML27292588
SVG35029268
Bourne Shell35578194
C/C++ Header24046132
reStructuredText19413597
YAML67044
HTML261343
m41111141
PO File68039
Qt Linguist10010
DOS Batch1004
INI1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 157)
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.24
▷ Minimum class complexity1.00
▷ Maximum class complexity735.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity157.00
Code structure
Namespaces126
Interfaces73
Traits12
Classes867
▷ Abstract classes576.57%
▷ Concrete classes81093.43%
▷ Final classes364.44%
Methods5,658
▷ Static methods84414.92%
▷ Public methods4,66682.47%
▷ Protected methods72012.73%
▷ Private methods2724.81%
Functions355
▷ Named functions14039.44%
▷ Anonymous functions21560.56%
Constants270
▷ Global constants3011.11%
▷ Class constants24088.89%
▷ Public constants240100.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
23 PNG files occupy 0.30MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fields/phone_better/assets/img/flags.png67.65KB23.60KB▼ 65.12%
assets/build/css/minicolor-colors.png12.19KB8.26KB▼ 32.22%
fields/color_picker/minicolor-trigger.png1.37KB0.88KB▼ 36.27%
vendor/mossadal/math-parser/doxygen/logo-159x50.png7.45KB3.94KB▼ 47.06%
fields/star-rate/images/star-half.png0.65KB0.65KB0.00%