84% cf7-signature

Code Review | Signature Field For Contact Form 7 - CF7Sign

WordPress plugin Signature Field For Contact Form 7 - CF7Sign scored84%from 54 tests.

About plugin

  • Plugin page: cf7-signature
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.2
  • WordPress version: 6.3.1
  • First release: Jan 5, 2022
  • Latest release: Jul 3, 2023
  • Number of updates: 19
  • Update frequency: every 28.6 days
  • Top authors: wpdebuglog (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /2,047 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.94ms] Passed 4 tests

Analyzing server-side resources used by Signature Field For Contact Form 7 - CF7Sign
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0452.31 ▲8.39
Dashboard /wp-admin3.35 ▲0.0546.96 ▼6.20
Posts /wp-admin/edit.php3.41 ▲0.0450.37 ▲1.21
Add New Post /wp-admin/post-new.php5.94 ▲0.0488.98 ▼9.43
Media Library /wp-admin/upload.php3.28 ▲0.0436.67 ▲2.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Signature Field For Contact Form 7 - CF7Sign
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.37 ▼0.211.87 ▼0.4343.19 ▼5.78
Dashboard /wp-admin2,198 ▲215.59 ▲0.0594.59 ▲1.9236.55 ▼7.62
Posts /wp-admin/edit.php2,100 ▼02.10 ▲0.1339.85 ▲0.8736.28 ▼4.40
Add New Post /wp-admin/post-new.php1,526 ▼223.36 ▲0.19664.94 ▼34.1751.87 ▼7.55
Media Library /wp-admin/upload.php1,400 ▲34.24 ▲0.0696.32 ▼7.9141.52 ▼5.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cf7-signature/cf7-signature.php:12

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: contact form 7, sig, sign, signature, signature field...

cf7-signature/cf7-signature.php Passed 13 tests

"Signature Field For Contact Form 7 - CF7Sign" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
40 characters long description:
Signature input field for contact form 7

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin263 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP28116226
JavaScript211637

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods660.00%
▷ Protected methods00.00%
▷ Private methods440.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin