94% better-redirects-for-gravity-forms

Code Review | Better Redirects for Gravity Forms

WordPress plugin Better Redirects for Gravity Forms scored 94% from 53 tests.

About plugin

  • Plugin page: better-redirects-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7.2
  • WordPress version: 5.8.1
  • First release: Jun 2, 2021
  • Latest release: Jun 20, 2021
  • Number of updates: 10
  • Update frequency: every 1.8 days
  • Top authors: xmic (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 159 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by Better Redirects for Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1539.23 ▲19.28
Dashboard /wp-admin3.09 ▲0.0441.21 ▼6.45
Posts /wp-admin/edit.php3.14 ▲0.0335.64 ▼8.09
Add New Post /wp-admin/post-new.php5.45 ▲0.0292.96 ▼1,230.18
Media Library /wp-admin/upload.php3.03 ▲0.0227.62 ▼9.84

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Better Redirects for Gravity Forms: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,650 ▲6816.21 ▲0.707.57 ▼0.3544.38 ▼1.26
Dashboard /wp-admin2,953 ▲1035.95 ▲0.12134.77 ▲3.89102.40 ▲1.93
Posts /wp-admin/edit.php2,703 ▼02.69 ▲0.0067.26 ▲4.9591.01 ▼0.47
Add New Post /wp-admin/post-new.php1,851 ▼617.51 ▼1.59356.71 ▼20.87113.06 ▼0.13
Media Library /wp-admin/upload.php1,772 ▼04.99 ▼0.02161.96 ▲19.09113.78 ▼5.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/better-redirects-for-gravity-forms/better-redirects-for-gravity-forms.php

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: gf, seo, 404, forms, gravity...

better-redirects-for-gravity-forms/better-redirects-for-gravity-forms.php 85% from 13 tests

The primary PHP file in "Better Redirects for Gravity Forms" version 1.2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin287 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP240109191
JavaScript1231083
CSS10013

PHP code Passed 2 tests

This is a short overview 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.27
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin