77% wp-forms-signature-contract-add-on

Code Review | WP Forms Signature Contract Add-On

WordPress plugin WP Forms Signature Contract Add-On scored77%from 54 tests.

About plugin

  • Plugin page: wp-forms-signatur...
  • Plugin version: 1.7.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Dec 28, 2016
  • Latest release: Jul 10, 2023
  • Number of updates: 97
  • Update frequency: every 24.6 days
  • Top authors: approveme (81.44%)stephenapproveme (19.59%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /40,181 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼10.14ms] Passed 4 tests

This is a short check of server-side resources used by WP Forms Signature Contract Add-On
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2939.86 ▼0.48
Dashboard /wp-admin3.66 ▲0.3546.59 ▼3.51
Posts /wp-admin/edit.php3.71 ▲0.3546.93 ▲3.32
Add New Post /wp-admin/post-new.php6.17 ▲0.2888.31 ▼37.77
Media Library /wp-admin/upload.php3.52 ▲0.2835.85 ▲1.20
About /wp-admin/admin.php?page=esign-wpforms-about3.5932.44

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 83 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
WP_ESignature__WP_Forms_Digital_Signature_documentation
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Forms Signature Contract Add-On
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.27 ▼1.421.63 ▼0.6742.43 ▼3.66
Dashboard /wp-admin2,232 ▲444.93 ▼0.88105.33 ▲3.7683.39 ▲36.99
Posts /wp-admin/edit.php2,118 ▲292.06 ▲0.0332.86 ▼3.1632.38 ▼1.15
Add New Post /wp-admin/post-new.php1,534 ▲517.71 ▼0.55723.83 ▲114.7262.47 ▲6.57
Media Library /wp-admin/upload.php1,414 ▲234.22 ▲0.0296.32 ▼6.9071.94 ▲26.51
About /wp-admin/admin.php?page=esign-wpforms-about1,8372.8784.81225.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • WP_ESignature__WP_Forms_Digital_Signature_documentation
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-forms-signature-contract-add-on/admin/views/esig-core-about.php
    • > /wp-content/plugins/wp-forms-signature-contract-add-on/admin/assets/js/index.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wp-forms-signature-contract-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-forms-signature-contract-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-forms-signature-contract-add-on/admin/rating-widget/views/esig-ratting-widget-view.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ESIG_WPFORM_SETTING' not found in wp-content/plugins/wp-forms-signature-contract-add-on/admin/esig-wpform-admin.php:9
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/wp-forms-signature-contract-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms_Builder_Panel_Settings' not found in wp-content/plugins/wp-forms-signature-contract-add-on/admin/views/esig-wpform-view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-forms-signature-contract-add-on/wpform-signature-addon.php:25
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-forms-signature-contract-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-forms-signature-contract-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-forms-signature-contract-add-on/admin/about/views/wpforms-esign-about-steps.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wp-forms-signature-contract-add-on/wpform-signature-addon.php 77% from 13 tests

This is the main PHP file of "WP Forms Signature Contract Add-On" version 1.7.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-forms-signature-contract-add-on.php" instead of "wpform-signature-addon.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: The description should be shorter than 140 characters (currently 252 characters long)

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
There were no executable files found in this plugin3,911 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP257432742,140
CSS5117331,403
SVG1111196
JavaScript4878172

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.86
▷ Minimum class complexity5.00
▷ Maximum class complexity70.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods76
▷ Static methods3546.05%
▷ Public methods6889.47%
▷ Protected methods00.00%
▷ Private methods810.53%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants11
▷ Global constants654.55%
▷ Class constants545.45%
▷ Public constants5100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 1.34MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/about/assets/images/companies/HBO_Latino_Logo.png3.19KB1.90KB▼ 40.38%
admin/about/assets/images/gf-completed-steps.png23.42KB23.45KB0.00%
admin/views/wpforms-screenshot.png121.33KB42.20KB▼ 65.22%
admin/about/assets/images/wpform-add-on-step-1.png23.28KB7.37KB▼ 68.33%
admin/about/assets/images/wpform-add-on-5a-3.png40.35KB11.82KB▼ 70.69%