93% gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits

Code Review | gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits

WordPress plugin gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits scored 93% from 54 tests.

About plugin

  • Plugin page: gravity-forms-rem...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 5.9.2
  • First release: Sep 15, 2014
  • Latest release: Oct 29, 2014
  • Number of updates: 4
  • Update frequency: every 11.8 days
  • Top authors: MikevHoenselaar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 860 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼304.56ms] Passed 4 tests

Server-side resources used by gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0356.57 ▲1.07
Dashboard /wp-admin3.43 ▲0.0236.12 ▼2.59
Posts /wp-admin/edit.php3.66 ▲0.0276.16 ▲32.64
Add New Post /wp-admin/post-new.php6.90 ▼0.0798.43 ▼1,210.95
Media Library /wp-admin/upload.php3.31 ▲0.0227.38 ▼5.78

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,749 ▼615.36 ▼0.436.35 ▼0.062.43 ▼1.07
Dashboard /wp-admin2,881 ▲236.12 ▼0.03120.65 ▼13.74155.10 ▼7.72
Posts /wp-admin/edit.php2,685 ▼63.24 ▼0.0067.05 ▲0.49146.72 ▲4.59
Add New Post /wp-admin/post-new.php1,698 ▼1922.55 ▲1.49427.70 ▼7.85161.47 ▼21.81
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.02135.14 ▼5.22186.38 ▼46.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits/gfreq.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits === )
The official readme.txt might help

gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits/gfreq.php 85% from 13 tests

The main file in "gravity-forms-remove-required-and-add-optional-string-to-increase-form-submits" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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-remove-required-and-add-optional-string-to-increase-form-submits.php" instead of "gfreq.php")
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 79 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin452 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP293178335
CSS1213110
JavaScript1506
XML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity33.00
▷ Minimum class complexity21.00
▷ Maximum class complexity45.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods2993.55%
▷ Protected methods00.00%
▷ Private methods26.45%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG files were detected