77% signature-caldera-forms-online-contract-add-on

Code Review | Caldera Forms Signature Contract Add-On

WordPress plugin Caldera Forms Signature Contract Add-On scored 77% from 54 tests.

About plugin

  • Plugin page: signature-caldera...
  • Plugin version: 1.5.7.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.7
  • WordPress version: 5.9.2
  • First release: Mar 7, 2017
  • Latest release: May 18, 2021
  • Number of updates: 86
  • Update frequency: every 18.0 days
  • Top authors: approveme (97.67%)stephenapproveme (3.49%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 8,337 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: ▲0.05MB] [CPU: ▼291.81ms] Passed 4 tests

This is a short check of server-side resources used by Caldera Forms Signature Contract Add-On
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1152.23 ▲3.67
Dashboard /wp-admin3.47 ▲0.0633.27 ▲1.14
Posts /wp-admin/edit.php3.69 ▲0.0539.01 ▲1.32
Add New Post /wp-admin/post-new.php7.00 ▲0.0393.29 ▼1,166.71
Media Library /wp-admin/upload.php3.35 ▲0.0524.49 ▼2.97
  E-Signature /wp-admin/admin.php?page=esign-caldera-about3.4523.11

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 86 new files
Database: no new tables, 1 new option
New WordPress options
WP_ESignature__Caldera_Forms_Digital_Signature_documentation

Browser metrics Passed 4 tests

This is an overview of browser requirements for Caldera Forms Signature Contract Add-On
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,829 ▲7516.31 ▲0.316.08 ▼0.572.22 ▼0.87
Dashboard /wp-admin2,956 ▲1057.09 ▲0.88116.15 ▼14.05173.65 ▲23.71
Posts /wp-admin/edit.php2,759 ▲683.67 ▲0.3063.94 ▲0.92161.75 ▲21.81
Add New Post /wp-admin/post-new.php1,811 ▲15022.41 ▲6.32404.80 ▲1.70160.66 ▲5.09
Media Library /wp-admin/upload.php1,763 ▲655.93 ▲0.42124.58 ▼11.30201.61 ▲6.85
  E-Signature /wp-admin/admin.php?page=esign-caldera-about2,6684.38118.42340.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 1 option
    • WP_ESignature__Caldera_Forms_Digital_Signature_documentation

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/assets/js/index.php
    • > /wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/views/esig-core-about.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/signature-caldera-forms-online-contract-add-on/cf-signature-addon.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/about/autoload.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/about/views/caldera-esign-about-steps.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/includes/core-alert.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ESIG_CF_SETTING' not found in wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/esig-cfds-admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/includes/core-alert.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/signature-caldera-forms-online-contract-add-on/admin/views/alert-almost-done.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% 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 require attention: You can look at the official readme.txt

signature-caldera-forms-online-contract-add-on/cf-signature-addon.php 77% from 13 tests

Analyzing the main PHP file in "Caldera Forms Signature Contract Add-On" version 1.5.7.5
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 264 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("signature-caldera-forms-online-contract-add-on.php" instead of "cf-signature-addon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,410 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP227292791,938
CSS3104331,242
SVG1111196
JavaScript238734

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.50
▷ Minimum class complexity5.00
▷ Maximum class complexity65.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods60
▷ Static methods2745.00%
▷ Public methods5490.00%
▷ Protected methods00.00%
▷ Private methods610.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
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
30 PNG files occupy 2.88MB with 1.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/cf-add-on-step-4.png47.89KB28.87KB▼ 39.72%
admin/about/assets/images/cf-add-on-5a-1.png110.93KB46.27KB▼ 58.29%
admin/about/assets/images/gf-completed-steps.png23.42KB23.45KB0.00%
admin/includes/gravity-form.png48.76KB14.66KB▼ 69.93%
admin/assets/images/cf-add-on-step-6.png234.66KB91.20KB▼ 61.14%