77% edd-digital-signature-add-on

Code Review | Easy Digital Downloads Digital Signature

WordPress plugin Easy Digital Downloads Digital Signature scored77%from 54 tests.

About plugin

  • Plugin page: edd-digital-signa...
  • Plugin version: 1.7.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2015
  • Latest release: Jul 10, 2023
  • Number of updates: 114
  • Update frequency: every 25.3 days
  • Top authors: approveme (89.47%)stephenapproveme (11.4%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /12,491 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.34ms] Passed 4 tests

Analyzing server-side resources used by Easy Digital Downloads Digital Signature
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.78 ▲3.64
Dashboard /wp-admin3.33 ▲0.0360.79 ▲7.89
Posts /wp-admin/edit.php3.44 ▲0.0948.87 ▼6.04
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.81 ▼12.41
Media Library /wp-admin/upload.php3.25 ▲0.0342.40 ▲5.47
About /wp-admin/admin.php?page=esign-edd-about3.3533.83
E-Signature /wp-admin/edit.php?post_type=download&page=esign-edd-about3.2234.35

Server storage [IO: ▲1.41MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 84 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Easy Digital Downloads Digital Signature: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.46 ▲0.261.91 ▲0.2044.22 ▲0.05
Dashboard /wp-admin2,217 ▲395.56 ▼0.0996.15 ▼10.1876.70 ▲34.85
Posts /wp-admin/edit.php2,143 ▲432.00 ▲0.0234.88 ▼6.7934.11 ▼3.61
Add New Post /wp-admin/post-new.php1,713 ▲18522.32 ▼0.78766.26 ▲93.9858.05 ▼12.24
Media Library /wp-admin/upload.php1,431 ▲284.13 ▼0.0499.75 ▲2.4187.69 ▲43.06
About /wp-admin/admin.php?page=esign-edd-about1,7322.8979.57214.30
E-Signature /wp-admin/edit.php?post_type=download&page=esign-edd-about1,7522.8868.13108.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/edd-digital-signature-add-on/views/esig-core-about.php
    • > /wp-content/plugins/edd-digital-signature-add-on/views/esig-not-core-view.php
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/edd-digital-signature-add-on/rating-widget/views/esig-ratting-widget-view.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/edd-digital-signature-add-on/about/autoload.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/edd-digital-signature-add-on/about/views/esign-iframe.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Esig_Edd_Settings' not found in wp-content/plugins/edd-digital-signature-add-on/includes/esig-edd-admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/edd-digital-signature-add-on/views/core-msg.php:4
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/edd-digital-signature-add-on/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/edd-digital-signature-add-on/rating-widget/views/esig-ratting-widget-view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/edd-digital-signature-add-on/autoload.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/edd-digital-signature-add-on/views/edd-esig-product-view.php:6
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/edd-digital-signature-add-on/rating-widget/views/esig-ratting-widget-view.php on line 1

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 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #11 (**Checkout Completion:**Once customers have signed the necessary agreement, they’ll be sent to the final Easy Digital Downloads screen to finalize the transaction.), #12 (**View Signed Document Email:**Customers will be sent an email that includes the link to the document (and PDF if you opt for this method).), #13 (**Save as PDF:**Customers can either print or download their signed document from the website. To do this, they need to click “View Signed Document” from the link in the email they attained upon signing the document. With the Attach as PDF add-on install you could also automatically include thee signed contract as a PDF attachment in this email.)
  • Tags: There are too many tags (28 tag instead of maximum 10)
You can look at the official readme.txt

edd-digital-signature-add-on/edd-digital-signature.php 77% from 13 tests

The main file in "Easy Digital Downloads Digital Signature" v. 1.7.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 236 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("edd-digital-signature-add-on.php" instead of "edd-digital-signature.php")
  • 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 | 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,194 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP297072662,232
CSS5116331,395
PO File16161228
SVG1111196
JavaScript3539143

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.22
▷ Minimum class complexity5.00
▷ Maximum class complexity29.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods94
▷ Static methods6872.34%
▷ Public methods9196.81%
▷ Protected methods00.00%
▷ Private methods33.19%
Functions16
▷ Named functions1487.50%
▷ Anonymous functions212.50%
Constants11
▷ Global constants654.55%
▷ Class constants545.45%
▷ Public constants5100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
16 PNG files occupy 0.60MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
about/assets/images/gf-magic-hat.png27.96KB6.81KB▼ 75.66%
about/assets/images/edd-add-on-step-1.png23.28KB7.37KB▼ 68.33%
about/assets/images/gf-advisor.png48.61KB48.68KB0.00%
about/assets/images/edd-add-on-step-3.png80.37KB25.57KB▼ 68.18%
about/assets/images/monster-support.png24.68KB24.70KB0.00%