77% forms-digital-signature-forminator-add-on

Code Review | Electronic Signature Add-on for Forminator

WordPress plugin Electronic Signature Add-on for Forminator scored77%from 54 tests.

About plugin

  • Plugin page: forms-digital-sig...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 13, 2022
  • Latest release: Jul 10, 2023
  • Number of updates: 34
  • Update frequency: every 8.8 days
  • Top authors: approveme (82.35%)stephenapproveme (20.59%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,303 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.22MB] [CPU: ▼5.90ms] Passed 4 tests

Analyzing server-side resources used by Electronic Signature Add-on for Forminator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2240.68 ▼1.42
Dashboard /wp-admin3.53 ▲0.1848.07 ▼13.92
Posts /wp-admin/edit.php3.64 ▲0.2852.84 ▲4.61
Add New Post /wp-admin/post-new.php6.13 ▲0.2483.24 ▼11.80
Media Library /wp-admin/upload.php3.45 ▲0.2236.38 ▲3.53
E-signature /wp-admin/admin.php?page=esign-forminator-about3.5534.82

Server storage [IO: ▲1.64MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 76 new files
Database: no new tables, 7 new options
New WordPress options
WP_ESignature__Forminator_Digital_Signature_documentation
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Electronic Signature Add-on for Forminator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲8913.46 ▼0.842.03 ▼0.1338.38 ▼5.85
Dashboard /wp-admin2,244 ▲535.05 ▲0.13108.12 ▲4.9482.61 ▲39.83
Posts /wp-admin/edit.php2,129 ▲432.32 ▲0.3136.98 ▲3.3735.72 ▼0.29
Add New Post /wp-admin/post-new.php1,546 ▲3217.68 ▲0.23719.54 ▲96.3738.50 ▼7.06
Media Library /wp-admin/upload.php1,423 ▲354.45 ▲0.13112.91 ▲18.0645.04 ▲4.01
E-signature /wp-admin/admin.php?page=esign-forminator-about1,8392.8777.47186.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • WP_ESignature__Forminator_Digital_Signature_documentation
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Forminator_Addon_Esignature_Exception' not found in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/integration/esign-forminator-form-settings-exception.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/views/alert-almost-done.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Forminator_Addon_Esignature_Exception' not found in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/integration/esign-forminator-form-settings-exception.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/about/views/esign-iframe.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Forminator_Addon_Form_Hooks_Abstract' not found in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/integration/esign-forminator-form-hooks.php:9
    • > PHP Notice
      Undefined variable: template_vars in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/integration/views/esign-form-setting.php on line 14
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/integration/views/esign-form-setting.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/integration/views/setup-esign-integration.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/integration/views/setup-esign-integration-success.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/forms-digital-signature-forminator-add-on/admin/about/views/forminator-esign-about-steps.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=esign-forminator-about
    • > Network (severe)
    wp-content/plugins/forms-digital-signature-forminator-add-on/admin/assets/images/pen_icon.svg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 79% 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
Attributes that need to be fixed: You can take inspiration from this readme.txt

forms-digital-signature-forminator-add-on/forminator-signature-add-on.php 69% from 13 tests

Analyzing the main PHP file in "Electronic Signature Add-on for Forminator" version 1.0.8
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("forms-digital-signature-forminator-add-on.php" instead of "forminator-signature-add-on.php")
  • Description: The description should be shorter than 140 characters (currently 268 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,803 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP259635792,320
CSS388281,160
SVG1110188
JavaScript3518135

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.27
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods78
▷ Static methods2430.77%
▷ Public methods7393.59%
▷ Protected methods00.00%
▷ Private methods56.41%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
23 PNG files occupy 1.01MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/about/assets/images/forminator-team-contracts.png25.94KB26.05KB0.00%
admin/about/assets/images/forminator-add-on-step-4.png47.89KB28.87KB▼ 39.72%
admin/about/assets/images/forminator-add-on-step-1.png24.71KB10.43KB▼ 57.77%
admin/about/assets/images/forminator-add-on-5a-2.png99.51KB36.06KB▼ 63.76%
admin/about/assets/images/approveme-wp-logo.png27.13KB6.98KB▼ 74.27%