93% gravity-forms-force-ssl

Code Review | Gravity Forms: Force SSL

WordPress plugin Gravity Forms: Force SSL scored 93% from 54 tests.

About plugin

  • Plugin page: gravity-forms-for...
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Aug 29, 2014
  • Latest release: Jan 29, 2015
  • Number of updates: 15
  • Update frequency: every 10.2 days
  • Top authors: codearachnid (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active / 4,150 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Gravity Forms: Force SSL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0235.93 ▲3.65
Dashboard /wp-admin3.08 ▲0.0344.31 ▼2.20
Posts /wp-admin/edit.php3.13 ▲0.0343.72 ▼5.73
Add New Post /wp-admin/post-new.php5.44 ▲0.0193.83 ▼566.74
Media Library /wp-admin/upload.php3.02 ▲0.0232.62 ▼6.83

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms: Force SSL
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11615.98 ▲0.1010.79 ▲2.2848.54 ▼7.49
Dashboard /wp-admin2,976 ▲455.93 ▼0.22148.89 ▼27.14106.61 ▼2.85
Posts /wp-admin/edit.php2,748 ▲92.73 ▲0.0267.97 ▼16.8288.60 ▲2.86
Add New Post /wp-admin/post-new.php1,619 ▼6421.57 ▲3.08307.92 ▼78.11105.13 ▼11.68
Media Library /wp-admin/upload.php1,815 ▲675.07 ▲0.08159.61 ▼1.45112.89 ▼6.94

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 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/gravity-forms-force-ssl/gravityforms-force-ssl.php
    • > /wp-content/plugins/gravity-forms-force-ssl/form-settings.php
    • > /wp-content/plugins/gravity-forms-force-ssl/global-settings.php
    • > /wp-content/plugins/gravity-forms-force-ssl/plugin-settings.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 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: A description for screenshot #0 is missing in gravity-forms-force-ssl/assets to your readme.txt
  • Requires at least: The plugin version is formatted incorrectly
  • Screenshots: Screenshot #1 (Enable SSL on form settings) image required
You can take inspiration from this readme.txt

gravity-forms-force-ssl/gravityforms-force-ssl.php 85% from 13 tests

The principal PHP file in "Gravity Forms: Force SSL" v. 1.4.1 is loaded by WordPress automatically on each request
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-force-ssl.php" instead of "gravityforms-force-ssl.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin149 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP54148149

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods327.27%
▷ Public methods11100.00%
▷ Protected methods00.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
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png73.44KB27.89KB▼ 62.02%