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

Code Review | Ninja Forms Signature Contract Add-On

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

About plugin

  • Plugin page: ninja-signature-c...
  • Plugin version: 3.1.7.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2016
  • Latest release: Jul 10, 2023
  • Number of updates: 168
  • Update frequency: every 16.2 days
  • Top authors: approveme (88.69%)stephenapproveme (11.9%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /35,968 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.17ms] Passed 4 tests

Server-side resources used by Ninja Forms Signature Contract Add-On
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.52 ▼1.31
Dashboard /wp-admin3.44 ▲0.1048.23 ▼12.38
Posts /wp-admin/edit.php3.49 ▲0.1348.96 ▲2.76
Add New Post /wp-admin/post-new.php5.98 ▲0.0993.63 ▼9.76
Media Library /wp-admin/upload.php3.30 ▲0.0741.16 ▲8.12
E-signature /wp-admin/admin.php?page=esign-ninja-about3.4130.42
About /wp-admin/admin.php?page=esign-ninjaforms-about3.2832.42

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 99 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
WP_ESignature__Ninja_Forms_Digital_Signature_documentation
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ninja Forms Signature Contract Add-On
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.20 ▼1.151.88 ▲0.2543.72 ▼1.13
Dashboard /wp-admin2,220 ▲405.79 ▲0.1898.21 ▼2.2394.06 ▲48.43
Posts /wp-admin/edit.php2,145 ▲452.30 ▲0.3233.52 ▼5.1135.01 ▲1.38
Add New Post /wp-admin/post-new.php1,718 ▲18322.57 ▲4.29733.95 ▲97.0537.43 ▼33.41
Media Library /wp-admin/upload.php1,443 ▲434.34 ▲0.12100.14 ▲5.9467.41 ▲27.49
E-signature /wp-admin/admin.php?page=esign-ninja-about1,8662.8874.78215.74
About /wp-admin/admin.php?page=esign-ninjaforms-about1,8872.8966.71118.72

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 were found after uninstall: 7 options
    • db_upgraded
    • can_compress_scripts
    • WP_ESignature__Ninja_Forms_Digital_Signature_documentation
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • 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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ninja-signature-contract-forms-add-on/admin/assets/js/index.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ESIG_NF_SETTING' not found in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/esig-nfds-admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/views/esig-ninja-action-view.php:3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 2
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 1
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/ninja-signature-contract-forms-add-on/admin/admin/about/includes/esig-activations-states.php' (include_path='.:/usr/share/php') in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/about/views/alert-modal.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ninja-signature-contract-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/ninja-signature-contract-forms-add-on/admin/rating-widget/views/esig-ratting-widget-view.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/about/views/autoload.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ninja-signature-contract-forms-add-on/admin/about/autoload.php:17

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, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

ninja-signature-contract-forms-add-on/ninja-forms-digital-signature.php 77% from 13 tests

"Ninja Forms Signature Contract Add-On" version 3.1.7.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ninja-signature-contract-forms-add-on.php" instead of "ninja-forms-digital-signature.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 258 characters long)
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin5,410 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,2284403,511
CSS6119331,456
JavaScript58731223
SVG1111196
PO File12224

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity36.33
▷ Minimum class complexity2.00
▷ Maximum class complexity197.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods113
▷ Static methods5851.33%
▷ Public methods10592.92%
▷ Protected methods00.00%
▷ Private methods87.08%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.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
21 PNG files occupy 1.55MB with 0.46MB 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/nf-add-on-step-4.png47.89KB28.87KB▼ 39.72%
admin/about/assets/images/gf-preview-webpage.png11.63KB11.62KB0.10%
admin/about/assets/images/gf-team-contracts.png25.94KB26.05KB0.00%
admin/rating-widget/views/esign-monster.png12.46KB3.78KB▼ 69.70%