77% gravity-signature-forms-add-on

Code Review | Signature Add-On for Gravity Forms

WordPress plugin Signature Add-On for Gravity Forms scored77%from 54 tests.

About plugin

  • Plugin page: gravity-signature...
  • Plugin version: 1.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Sep 10, 2015
  • Latest release: Jul 10, 2023
  • Number of updates: 286
  • Update frequency: every 10.0 days
  • Top authors: approveme (90.56%)stephenapproveme (9.79%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active /106,002 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼5.47ms] Passed 4 tests

An overview of server-side resources used by Signature Add-On for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4038.30 ▼3.42
Dashboard /wp-admin3.70 ▲0.4045.50 ▼2.76
Posts /wp-admin/edit.php3.76 ▲0.4046.93 ▼0.04
Add New Post /wp-admin/post-new.php6.22 ▲0.3381.63 ▼15.67
Media Library /wp-admin/upload.php3.57 ▲0.3337.40 ▲4.09
About /wp-admin/admin.php?page=esign-gravity-about3.6433.42

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 92 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
WP_ESignature__Gravity Form_documentation
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Signature Add-On for Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲4414.14 ▼0.211.63 ▼0.3441.34 ▲1.95
Dashboard /wp-admin2,224 ▲475.70 ▲0.1381.73 ▼5.9270.56 ▲29.28
Posts /wp-admin/edit.php2,126 ▲262.01 ▲0.0335.12 ▲0.3833.36 ▼1.48
Add New Post /wp-admin/post-new.php1,713 ▲18724.26 ▲1.10671.22 ▲71.8861.17 ▲9.30
Media Library /wp-admin/upload.php1,426 ▲294.18 ▼0.0993.95 ▼5.8072.64 ▲30.81
About /wp-admin/admin.php?page=esign-gravity-about1,8472.8774.78220.08

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • WP_ESignature__Gravity Form_documentation
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 0% 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 fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/gravity-signature-forms-add-on/admin/views/alert-modal.php
    • > /wp-content/plugins/gravity-signature-forms-add-on/admin/includes/esig-gf-script-settings.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/gravity-signature-forms-add-on/admin/about/views/esign-iframe.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gravity-signature-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 2
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/gravity-signature-forms-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/gravity-signature-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/gravity-signature-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gravity-signature-forms-add-on/admin/about/autoload.php:17
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/gravity-signature-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 1
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/gravity-signature-forms-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/gravity-signature-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'ESIG_GF_VALUE' not found in wp-content/plugins/gravity-signature-forms-add-on/admin/esig-gravity-form-admin.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

gravity-signature-forms-add-on/gravity-signature-forms-addon.php 77% from 13 tests

The main file in "Signature Add-On for Gravity Forms" v. 1.8.2 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: Name the main plugin file the same as the plugin slug ("gravity-signature-forms-add-on.php" instead of "gravity-signature-forms-addon.php")
  • Description: The description should be shorter than 140 characters (currently 261 characters long)
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin4,449 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP251,0324752,567
CSS597311,230
JavaScript610720329
SVG1212205
PO File14144118

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.39
Average class complexity29.60
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods119
▷ Static methods4638.66%
▷ Public methods10689.08%
▷ Protected methods21.68%
▷ Private methods119.24%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants9
▷ Global constants333.33%
▷ Class constants666.67%
▷ Public constants6100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 PNG files occupy 1.29MB with 0.71MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/about/assets/images/gf-add-on-step-1.png23.28KB7.37KB▼ 68.33%
admin/views/gravity-form.png48.76KB14.66KB▼ 69.93%
admin/about/assets/images/gf-add-on-5a-2.png130.40KB39.59KB▼ 69.64%
admin/about/assets/images/gf-add-on-step-3.png80.37KB25.57KB▼ 68.18%
admin/about/assets/images/gf-preview-webpage.png11.63KB11.62KB0.10%