84% thrive-esig-gen

Code Review | THRIVE eSig Generator

WordPress plugin THRIVE eSig Generator scored84%from 54 tests.

About plugin

  • Plugin page: thrive-esig-gen
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2020
  • Latest release: Mar 24, 2023
  • Number of updates: 21
  • Update frequency: every 45.5 days
  • Top authors: deanoakley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /768 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼4.76ms] Passed 4 tests

An overview of server-side resources used by THRIVE eSig Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2942.46 ▼2.07
Dashboard /wp-admin3.58 ▲0.2851.72 ▼2.09
Posts /wp-admin/edit.php3.70 ▲0.3452.41 ▲4.32
Add New Post /wp-admin/post-new.php6.23 ▲0.3486.19 ▼16.50
Media Library /wp-admin/upload.php3.50 ▲0.2839.78 ▲1.62
All Signatures /wp-admin/edit.php?post_type=siggen-signature3.5539.88
Add New /wp-admin/post-new.php?post_type=siggen-signature3.6295.03

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
siggen_version
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for THRIVE eSig Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲16913.81 ▼0.625.75 ▲3.8546.76 ▲4.66
Dashboard /wp-admin2,232 ▲444.84 ▼0.04108.58 ▼2.3540.85 ▼3.56
Posts /wp-admin/edit.php2,118 ▲262.17 ▲0.1737.33 ▼4.7537.67 ▲0.58
Add New Post /wp-admin/post-new.php1,539 ▲2523.09 ▲5.31668.15 ▼34.4950.11 ▼5.08
Media Library /wp-admin/upload.php1,417 ▲354.23 ▲0.0296.62 ▼13.4841.36 ▼7.76
All Signatures /wp-admin/edit.php?post_type=siggen-signature1,0821.9532.7030.53
Add New /wp-admin/post-new.php?post_type=siggen-signature2,1543.7979.5137.70

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • siggen_version
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/thrive-esig-gen/includes/templates/single-siggen-signature.php:3

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: template, generator, wordpress, signature, plugin...

thrive-esig-gen/siggen.php 85% from 13 tests

The main PHP file in "THRIVE eSig Generator" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("thrive-esig-gen.php" instead of "siggen.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,905 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP92506941,713
JavaScript72935154
CSS25438

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity28.20
▷ Minimum class complexity5.00
▷ Maximum class complexity65.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods50
▷ Static methods24.00%
▷ Public methods4794.00%
▷ Protected methods00.00%
▷ Private methods36.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/socials/circle/twitter.png1.22KB1.36KB0.00%
assets/img/socials/circle/medium.png1.33KB1.43KB0.00%
assets/img/socials/normal/medium.png1.20KB1.38KB0.00%
assets/img/socials/circle/slack.png1.44KB1.34KB▼ 6.79%
assets/img/socials/normal/youtube.png0.78KB0.93KB0.00%