77% digital-signature-contact-form-7-addon

Code Review | Contact Forms 7 Digital Signature Add-On

WordPress plugin Contact Forms 7 Digital Signature Add-On scored77%from 54 tests.

About plugin

  • Plugin page: digital-signature...
  • Plugin version: 1.8.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2017
  • Latest release: Aug 7, 2023
  • Number of updates: 119
  • Update frequency: every 19.8 days
  • Top authors: approveme (85.71%)stephenapproveme (15.13%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /20,087 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.11ms] Passed 4 tests

Analyzing server-side resources used by Contact Forms 7 Digital Signature Add-On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.36 ▲1.25
Dashboard /wp-admin3.43 ▲0.0944.73 ▼14.57
Posts /wp-admin/edit.php3.48 ▲0.1347.06 ▼2.87
Add New Post /wp-admin/post-new.php5.97 ▲0.08102.36 ▼1.95
Media Library /wp-admin/upload.php3.29 ▲0.0634.47 ▼1.05
E-signature /wp-admin/admin.php?page=esign-cf7-about3.3933.59

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 99 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
WP_ESignature__Cf7_Forms_Digital_Signature_documentation
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Contact Forms 7 Digital Signature Add-On
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲6913.88 ▼0.531.81 ▼0.2144.14 ▲2.02
Dashboard /wp-admin2,249 ▲615.20 ▲0.32100.24 ▼5.6890.07 ▲49.95
Posts /wp-admin/edit.php2,128 ▲362.48 ▲0.4932.64 ▼7.1833.94 ▼2.64
Add New Post /wp-admin/post-new.php1,561 ▲1818.35 ▼0.04672.22 ▲70.7140.37 ▼10.83
Media Library /wp-admin/upload.php1,431 ▲404.37 ▲0.18102.66 ▲1.4777.44 ▲33.73
E-signature /wp-admin/admin.php?page=esign-cf7-about1,8472.8772.16211.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • WP_ESignature__Cf7_Forms_Digital_Signature_documentation
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/digital-signature-contact-form-7-addon/admin/views/esig-core-about.php
    • > /wp-content/plugins/digital-signature-contact-form-7-addon/admin/assets/js/index.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/digital-signature-contact-form-7-addon/admin/about/autoload.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/digital-signature-contact-form-7-addon/admin/views/esig-cf7-view.php:186
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/digital-signature-contact-form-7-addon/admin/views/alert-almost-done.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/digital-signature-contact-form-7-addon/admin/rating-widget/views/esig-ratting-widget-view.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'ESIG_CF7_SETTING' not found in wp-content/plugins/digital-signature-contact-form-7-addon/admin/esig-cf7-admin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/digital-signature-contact-form-7-addon/admin/views/core-alert.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/digital-signature-contact-form-7-addon/admin/about/views/esign-iframe.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/digital-signature-contact-form-7-addon/cf7-signature-addon.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/digital-signature-contact-form-7-addon/admin/about/views/cf7-esign-about-steps.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 29 tag instead of maximum 10
You can look at the official readme.txt

digital-signature-contact-form-7-addon/cf7-signature-addon.php 85% from 13 tests

"Contact Forms 7 Digital Signature Add-On" version 1.8.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • 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
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("digital-signature-contact-form-7-addon.php" instead of "cf7-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
Good job! No executable or dangerous file extensions detected4,085 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP268683202,232
CSS5117331,401
JavaScript610213256
SVG1111196

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.57
▷ Minimum class complexity3.00
▷ Maximum class complexity92.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods75
▷ Static methods2837.33%
▷ Public methods6890.67%
▷ Protected methods00.00%
▷ Private methods79.33%
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

PNG files should be compressed to save space and minimize bandwidth usage
35 PNG files occupy 3.13MB with 1.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/rating-widget/views/esign-monster.png12.46KB3.78KB▼ 69.70%
admin/about/assets/images/gf-completed-steps.png23.42KB23.45KB0.00%
admin/about/assets/images/cf7-add-on-step-3.png80.37KB25.57KB▼ 68.18%
admin/about/assets/images/cf7-add-on-step-7.png450.84KB166.18KB▼ 63.14%
admin/assets/images/cf7-add-on-step-3.png21.33KB11.27KB▼ 47.15%