70% esign-genie-for-wp

Code Review | Foxit eSign for WordPress

WordPress plugin Foxit eSign for WordPress scored70%from 54 tests.

About plugin

  • Plugin page: esign-genie-for-wp
  • Plugin version: 2.0.1
  • PHP compatiblity: +
  • PHP version: 7.4.16
  • WordPress compatibility: -6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2021
  • Latest release: May 26, 2023
  • Number of updates: 24
  • Update frequency: every 24.3 days
  • Top authors: esigngenie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.19MB] [CPU: ▲1,113.79ms] 50% from 4 tests

Server-side resources used by Foxit eSign for WordPress
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,167.35ms on /wp-admin/admin.php?page=wpesg-edit-mapping)
  • Extra CPU: The extra CPU usage must be under 200.00ms (currently 1,113.79ms on /wp-admin/admin.php?page=wpesg-edit-mapping)
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.651,177.27 ▲1,138.95
Dashboard /wp-admin3.82 ▲0.471,163.95 ▲1,104.65
Posts /wp-admin/edit.php3.87 ▲0.511,590.78 ▲1,542.51
Add New Post /wp-admin/post-new.php3.63 ▼2.261,188.44 ▲1,099.54
Media Library /wp-admin/upload.php3.74 ▲0.511,147.42 ▲1,112.01
All Mappings /wp-admin/admin.php?page=wpesg-mapping-list3.651,117.95
Add New Mapping /wp-admin/admin.php?page=wpesg-add-mapping3.691,145.70
Settings /wp-admin/admin.php?page=wpesg-settings3.641,160.18
Edit Mapping /wp-admin/admin.php?page=wpesg-edit-mapping3.621,167.35

Server storage [IO: ▲0.34MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 21 new files
Database: 6 new tables, 6 new options
New tables
wp_wpesg_party_require_param
wp_wpesg_party_mapping
wp_wpesg_owner_details
wp_wpesg_fields_mapping
wp_wpesg_template_response
wp_wpesg_mapping_system
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Foxit eSign for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9714.28 ▼0.251.60 ▼0.0938.02 ▼1.75
Dashboard /wp-admin2,248 ▲685.59 ▼0.0382.20 ▼5.4659.77 ▲18.40
Posts /wp-admin/edit.php2,154 ▲541.98 ▲0.0434.97 ▲1.0031.19 ▼4.38
Add New Post /wp-admin/post-new.php1,725 ▲35920.40 ▲3.71619.93 ▲39.1260.99 ▲12.40
Media Library /wp-admin/upload.php1,520 ▲1234.16 ▼0.09109.78 ▲15.1871.23 ▲27.71
All Mappings /wp-admin/admin.php?page=wpesg-mapping-list1,1062.2225.3227.41
Add New Mapping /wp-admin/admin.php?page=wpesg-add-mapping9532.2124.1026.30
Settings /wp-admin/admin.php?page=wpesg-settings8702.2023.6126.26
Edit Mapping /wp-admin/admin.php?page=wpesg-edit-mapping1,1842.0826.5934.78

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+168
    Undefined variable: esg_wpforms_option
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+176
    Undefined variable: esg_templates_option
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+91
    Undefined index: itemId
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+92
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+94
    Trying to get property 'signInSequence' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+105
    Trying to get property 'sign_option' of non-object
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+154
    Trying to get property 'mapping_name' of non-object
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+198
    Trying to get property 'wp_form_id' of non-object
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+206
    Trying to get property 'esg_template_id' of non-object
    • > GET request to /wp-admin/admin.php?page=wpesg-edit-mapping
    • > Notice in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php+313
    Undefined variable: no

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/esign-genie-for-wp/index.php
  • 11× 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 add_action() in wp-content/plugins/esign-genie-for-wp/add-edit-mapping-function.php:495
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/esign-genie-for-wp/inc/wpesg_database_quries_class.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/esign-genie-for-wp/inc/wpesg_database_quries_class.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/esign-genie-for-wp/wpesg_mapping_list.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/esign-genie-for-wp/inc/wpesg_database_quries_class.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/esign-genie-for-wp/inc/wpesg_database_quries_class.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/esign-genie-for-wp/wpesg_mapping_list.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/esign-genie-for-wp/wpesg_mapping_list.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/esign-genie-for-wp/inc/wpesg_database_quries_class.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/esign-genie-for-wp/inc/wpesg_database_quries_class.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (This screen shot description corresponds to screenshot-1.jpg.)
You can take inspiration from this readme.txt

esign-genie-for-wp/esign-genie-for-wp.php 62% from 13 tests

This is the main PHP file of "Foxit eSign for WordPress" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/")
  • Description: Please keep the plugin description shorter than 140 characters (currently 347 characters long)
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "")
  • Requires at least: Please use periods and digits for the required version (ex. "7.0" instead of "")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,799 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP81791672,134
CSS32710425
JavaScript1236240

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity8.33
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity1.49
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods45
▷ Static methods511.11%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions3694.74%
▷ Anonymous functions25.26%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
asset/admin/images/question-circle-light.png0.48KB0.31KB▼ 36.18%
(invalid) asset/admin/images/eSignGenie-logo.png30.02KB0.00KB▼ 100.00%
asset/admin/images/trash-alt-light.png0.25KB0.17KB▼ 32.67%
asset/admin/images/favicon.png0.60KB0.73KB0.00%