84% gravity-forms-duplicate-prevention

Code Review | Gravity Forms Duplicate Prevention

WordPress plugin Gravity Forms Duplicate Prevention scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-dup...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2013
  • Latest release: Mar 20, 2016
  • Number of updates: 12
  • Update frequency: every 94.7 days
  • Top authors: BuckeyeInteractive (58.33%)stevegrunwell (50%)

Code review

54 tests

User reviews

12 reviews

Install metrics

800+ active /25,500 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.02MB] [CPU: ▼8.05ms] Passed 4 tests

An overview of server-side resources used by Gravity Forms Duplicate Prevention
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.82 ▼6.02
Dashboard /wp-admin3.33 ▼0.0148.14 ▼18.40
Posts /wp-admin/edit.php3.38 ▲0.0348.99 ▼2.68
Add New Post /wp-admin/post-new.php5.91 ▲0.0386.27 ▼5.11
Media Library /wp-admin/upload.php3.25 ▲0.0337.31 ▲2.49

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms Duplicate Prevention
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.58 ▼0.851.92 ▼0.0741.27 ▲3.23
Dashboard /wp-admin2,218 ▲124.92 ▼1.00101.42 ▼5.2539.66 ▼0.67
Posts /wp-admin/edit.php2,100 ▲32.04 ▲0.0137.42 ▼1.6734.97 ▲0.08
Add New Post /wp-admin/post-new.php1,545 ▲1923.20 ▲5.54681.88 ▲14.0855.12 ▼1.76
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0197.85 ▼5.1142.95 ▲0.35

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-forms-duplicate-prevention/gravityforms-duplicateprevention.php:202

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: gravity forms, forms

gravity-forms-duplicate-prevention/gravityforms-duplicateprevention.php 92% from 13 tests

The entry point to "Gravity Forms Duplicate Prevention" version 0.1.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gravity-forms-duplicate-prevention.php" instead of "gravityforms-duplicateprevention.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected94 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258988
JavaScript13126

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods550.00%
▷ Protected methods550.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin