100% gf-prevent-duplicates

Code Review | Gravity Forms Prevent Duplicates

WordPress plugin Gravity Forms Prevent Duplicates scored 100% from 54 tests.

About plugin

  • Plugin page: gf-prevent-duplic...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 5.8.1
  • First release: Sep 19, 2017
  • Latest release: Feb 17, 2020
  • Number of updates: 17
  • Update frequency: every 51.9 days
  • Top authors: munger41 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 2,310 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Gravity Forms Prevent Duplicates
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0338.75 ▲9.59
Dashboard /wp-admin3.09 ▲0.0456.74 ▲10.37
Posts /wp-admin/edit.php3.14 ▲0.0454.71 ▲11.66
Add New Post /wp-admin/post-new.php5.45 ▲0.02100.07 ▼593.32
Media Library /wp-admin/upload.php3.03 ▲0.0340.81 ▲10.56
GFPD /wp-admin/options-general.php?page=gfpd_settings3.0026.76

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms Prevent Duplicates
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲24616.30 ▲1.1013.57 ▲2.3353.75 ▼1.53
Dashboard /wp-admin2,972 ▲415.94 ▼0.04160.40 ▲5.56121.65 ▼8.66
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0191.10 ▼15.56108.75 ▼27.88
Add New Post /wp-admin/post-new.php1,686 ▲318.53 ▲1.70442.44 ▲9.47133.40 ▲9.24
Media Library /wp-admin/upload.php1,812 ▲24.99 ▼0.02183.83 ▲24.89145.85 ▲15.16
GFPD /wp-admin/options-general.php?page=gfpd_settings1,0372.0858.6868.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: forms, duplicates, triple, double, prevent...

gf-prevent-duplicates/gf-prevent-duplicates.php Passed 13 tests

The primary PHP file in "Gravity Forms Prevent Duplicates" version 1.2.1 is used by WordPress to initiate all plugin functionality
60 characters long description:
Prevent duplicate submissions for all GF forms on your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected243 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23016187
JavaScript113456

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity4.50
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin