78% gravity-forms-multiple-form-instances

Code Review | Gravity Forms: Multiple Form Instances

WordPress plugin Gravity Forms: Multiple Form Instances scored78%from 54 tests.

About plugin

  • Plugin page: gravity-forms-mul...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Dec 16, 2014
  • Latest release: Apr 11, 2016
  • Number of updates: 40
  • Update frequency: every 12.1 days
  • Top authors: tyxla (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

1,000+ active /19,352 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.32ms] Passed 4 tests

A check of server-side resources used by Gravity Forms: Multiple Form Instances
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.64 ▼3.08
Dashboard /wp-admin3.33 ▲0.0252.30 ▲0.28
Posts /wp-admin/edit.php3.38 ▲0.0248.61 ▼0.92
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.26 ▼5.57
Media Library /wp-admin/upload.php3.25 ▲0.0239.14 ▲4.04

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gravity Forms: Multiple Form Instances
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.121.90 ▲0.1344.16 ▼0.39
Dashboard /wp-admin2,198 ▲215.61 ▼0.0585.41 ▼9.7938.88 ▼9.51
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0242.15 ▲3.6139.67 ▲4.73
Add New Post /wp-admin/post-new.php1,526 ▼617.52 ▼5.60671.67 ▼50.2859.34 ▼7.03
Media Library /wp-admin/upload.php1,400 ▲34.23 ▲0.03101.05 ▼3.0445.93 ▼1.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gravity-forms-multiple-form-instances/tests/bootstrap.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/gravity-forms-multiple-form-instances/tests/unit-tests/GFMFI_GformGetFormFilterTest.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/gravity-forms-multiple-form-instances/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/gravity-forms-multiple-form-instances/tests/bootstrap.php on line 48
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/gravity-forms-multiple-form-instances/tests/unit-tests/GFMFI_ConstructTest.php:3
    • > PHP Warning
      require_once(wp-content/plugins/gravity-forms-multiple-form-instances/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/gravity-forms-multiple-form-instances/tests/bootstrap.php on line 48
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/gravity-forms-multiple-form-instances/tests/unit-tests/GFMFI_GlobalVar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravity-forms-multiple-form-instances/gravityforms-multiple-form-instances.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: gravity, multiple, gravity forms, form

gravity-forms-multiple-form-instances/gravityforms-multiple-form-instances.php 92% from 13 tests

The primary PHP file in "Gravity Forms: Multiple Form Instances" version 1.1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gravity-forms-multiple-form-instances.php" instead of "gravityforms-multiple-form-instances.php")

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
No dangerous file extensions were detected568 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP6135215412
Bourne Shell1191960
YAML29047
Markdown233035
XML10014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.09
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods57
▷ Static methods11.75%
▷ Public methods5698.25%
▷ Protected methods00.00%
▷ Private methods11.75%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin