84% gravity-forms-enhancements

Code Review | Gravity Forms Enhancements

WordPress plugin Gravity Forms Enhancements scored84%from 54 tests.

About plugin

  • Plugin page: gravity-forms-enh...
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.4
  • WordPress version: 6.3.1
  • First release: Jan 26, 2015
  • Latest release: Mar 15, 2015
  • Number of updates: 12
  • Update frequency: every 5.3 days
  • Top authors: latorante (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /1,698 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Gravity Forms Enhancements
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.71 ▲2.37
Dashboard /wp-admin3.31 ▲0.0051.39 ▼5.22
Posts /wp-admin/edit.php3.36 ▲0.0051.09 ▼1.61
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.63 ▼5.17
Media Library /wp-admin/upload.php3.23 ▲0.0039.21 ▲1.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms Enhancements
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.75 ▲0.401.68 ▲0.0942.64 ▼2.56
Dashboard /wp-admin2,195 ▲155.62 ▼0.0484.55 ▼13.5739.72 ▼0.41
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0139.09 ▼5.1836.60 ▼2.05
Add New Post /wp-admin/post-new.php1,531 ▲223.35 ▲0.19656.74 ▼14.7164.47 ▲11.71
Media Library /wp-admin/upload.php1,403 ▲94.20 ▲0.0199.92 ▼2.0146.09 ▲1.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gravity-forms-enhancements/GravityFormsEnhacnerInit.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'GravityFormsEnhancer\\WordPress\\Settings' not found in wp-content/plugins/gravity-forms-enhancements/libs/GravityFormsEnhancer/Page/PageSettings.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'GravityFormsEnhancer\\RepositorySettings' not found in wp-content/plugins/gravity-forms-enhancements/libs/GravityFormsEnhancer/EnhancerSettings.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Settings page) image not found
The official readme.txt might help

gravity-forms-enhancements/GravityFormsEnhacner.php 92% from 13 tests

"Gravity Forms Enhancements" version 1.3.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gravity-forms-enhancements.php" instead of "GravityFormsEnhacner.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
Everything looks great! No dangerous files found in this plugin1,355 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP172891,0341,341
CSS11414

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity16.73
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes15
▷ Abstract classes213.33%
▷ Concrete classes1386.67%
▷ Final classes00.00%
Methods112
▷ Static methods4439.29%
▷ Public methods10694.64%
▷ Protected methods00.00%
▷ Private methods65.36%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png225.38KB73.33KB▼ 67.46%