84% kali-forms

Code Review | Contact Form builder with drag & drop for WordPress - Kali Forms

WordPress plugin Contact Form builder with drag & drop for WordPress - Kali Forms scored84%from 54 tests.

About plugin

  • Plugin page: kali-forms
  • Plugin version: 2.3.29
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Jul 1, 2019
  • Latest release: Oct 17, 2023
  • Number of updates: 107
  • Update frequency: every 14.8 days
  • Top authors: kaliforms (100%)

Code review

54 tests

User reviews

81 reviews

Install metrics

30,000+ active /1,075,442 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.31MB] [CPU: ▲2.16ms] Passed 4 tests

Server-side resources used by Contact Form builder with drag & drop for WordPress - Kali Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.60 ▲1.1444.97 ▲7.29
Dashboard /wp-admin4.66 ▲1.3259.66 ▼0.71
Posts /wp-admin/edit.php4.77 ▲1.4255.82 ▲9.11
Add New Post /wp-admin/post-new.php7.59 ▲1.7193.59 ▼7.06
Media Library /wp-admin/upload.php4.58 ▲1.3552.93 ▲17.78
Form Entries /wp-admin/edit.php?post_type=kaliforms_submitted4.6547.40
SMTP Settings /wp-admin/edit.php?post_type=kaliforms_forms&page=kaliforms-email-settings4.5744.39
Add New /wp-admin/post-new.php?post_type=kaliforms_forms5.4664.11
Form entries /wp-admin/edit.php?post_type=kaliforms_forms&page=kaliforms-form-entries4.6146.67
All forms /wp-admin/edit.php?post_type=kaliforms_forms4.7448.15
Extensions /wp-admin/edit.php?post_type=kaliforms_forms&page=kaliforms-extensions4.5542.84

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 511 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-comments
kaliforms_smtp_disable_autotls
kaliforms_notices
widget_theysaidso_widget
widget_recent-posts
kaliforms_smtp_provider
db_upgraded
kaliforms_settings_updated_for_220
kaliforms_smtp_auth
kaliforms_rating_timestamp
...

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form builder with drag & drop for WordPress - Kali Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,061 ▲31513.48 ▼0.878.04 ▲6.4137.29 ▼2.29
Dashboard /wp-admin2,343 ▲1635.66 ▲0.0683.49 ▼2.7877.44 ▲34.56
Posts /wp-admin/edit.php2,168 ▲712.07 ▲0.0535.15 ▲0.3335.56 ▲2.17
Add New Post /wp-admin/post-new.php1,730 ▲20422.06 ▼1.47718.41 ▲80.7652.55 ▲0.24
Media Library /wp-admin/upload.php1,470 ▲674.21 ▲0.0793.10 ▼8.7982.98 ▲38.64
Form Entries /wp-admin/edit.php?post_type=kaliforms_submitted1,1702.2333.5229.38
SMTP Settings /wp-admin/edit.php?post_type=kaliforms_forms&page=kaliforms-email-settings1,3298.83245.0891.57
Add New /wp-admin/post-new.php?post_type=kaliforms_forms2,58011.61319.86110.98
Form entries /wp-admin/edit.php?post_type=kaliforms_forms&page=kaliforms-form-entries1,0794.58147.6359.88
All forms /wp-admin/edit.php?post_type=kaliforms_forms1,7662.1838.0136.04
Extensions /wp-admin/edit.php?post_type=kaliforms_forms&page=kaliforms-extensions1,4022.1129.1929.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 14 options in the database
    • kaliforms_settings_updated_for_220
    • kaliforms_rating_timestamp
    • widget_theysaidso_widget
    • can_compress_scripts
    • kaliforms_smtp_disable_autotls
    • kaliforms_smtp_auth
    • db_upgraded
    • kaliforms_email_log
    • kaliforms_notices
    • widget_recent-comments
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/kali-forms/Inc/Utils/EmailUtilities/class-mailer.php on line 6
    • > PHP Warning
      require_once(ABSPATHWPINC/class-phpmailer.php): failed to open stream: No such file or directory in wp-content/plugins/kali-forms/Inc/Utils/EmailUtilities/class-mailer.php on line 6
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/kali-forms/Inc/Utils/EmailUtilities/class-mailer.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/class-phpmailer.php' (include_path='.:/usr/share/php') in wp-content/plugins/kali-forms/Inc/Utils/EmailUtilities/class-mailer.php on line 6
    • > PHP Fatal error
      Trait 'KaliForms\\Inc\\Utils\\MetaHelper' not found in wp-content/plugins/kali-forms/Inc/Utils/class-payments-action-helper.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'KaliForms\\Inc\\Utils\\EmailProviders\\Sender' not found in wp-content/plugins/kali-forms/Inc/Utils/EmailProviders/class-smtp.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPMailer\\PHPMailer\\PHPMailer' not found in wp-content/plugins/kali-forms/Inc/Utils/EmailUtilities/class-mailer-v6.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'KaliForms\\Inc\\Utils\\EmailProviders\\Sender' not found in wp-content/plugins/kali-forms/Inc/Utils/EmailProviders/class-default-mailer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'KaliForms\\Inc\\Utils\\EmailProviders\\Sender' not found in wp-content/plugins/kali-forms/Inc/Utils/EmailProviders/class-wp-default.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'KaliForms\\Inc\\Utils\\EmailProviders\\Sender' not found in wp-content/plugins/kali-forms/Inc/Utils/EmailProviders/class-postmark.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt is a good inspiration

kali-forms/kali-forms.php 92% from 13 tests

The main PHP file in "Contact Form builder with drag & drop for WordPress - Kali Forms" ver. 2.3.29 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected46,194 lines of code in 461 files:
LanguageFilesBlank linesComment linesLines of code
JSX13678352115,076
PHP1311,7545,51112,880
JavaScript1331,12210,01312,296
CSS122411543,010
Sass19444192,463
SVG2803383
Bourne Shell1323783
JSON1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.26
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces17
Interfaces0
Traits7
Classes122
▷ Abstract classes43.28%
▷ Concrete classes11896.72%
▷ Final classes00.00%
Methods682
▷ Static methods385.57%
▷ Public methods57584.31%
▷ Protected methods436.30%
▷ Private methods649.38%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants9
▷ Global constants9100.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
31 PNG files occupy 0.48MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/styles/rounded-borders-bg.png11.10KB3.30KB▼ 70.22%
public/assets/img/styles/border-bottom.png8.86KB2.28KB▼ 74.21%
public/assets/img/gmail.png23.79KB3.90KB▼ 83.62%
public/assets/img/mailgun.png41.45KB14.53KB▼ 64.94%
public/assets/img/styles/input-label-merge.png7.63KB2.06KB▼ 73.07%