72% styles-and-layouts-for-gravity-forms

Code Review | Styles & Layouts for Gravity Forms - Best Gravity Forms Styler, Designer

WordPress plugin Styles & Layouts for Gravity Forms - Best Gravity Forms Styler, Designer scored72%from 54 tests.

About plugin

  • Plugin page: styles-and-layout...
  • Plugin version: 4.3.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 8, 2016
  • Latest release: Sep 25, 2023
  • Number of updates: 126
  • Update frequency: every 22.1 days
  • Top authors: wpmonks (100%)

Code review

54 tests

User reviews

170 reviews

Install metrics

40,000+ active /681,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.32MB] [CPU: ▲4.56ms] Passed 4 tests

This is a short check of server-side resources used by Styles & Layouts for Gravity Forms - Best Gravity Forms Styler, Designer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3243.99 ▲5.46
Dashboard /wp-admin3.63 ▲0.3355.27 ▲5.66
Posts /wp-admin/edit.php3.74 ▲0.3952.25 ▲4.36
Add New Post /wp-admin/post-new.php6.21 ▲0.33109.12 ▲10.45
Media Library /wp-admin/upload.php3.55 ▲0.3337.16 ▲2.77
Add-Ons /wp-admin/admin.php?page=stla-addons3.5233.76
Licenses /wp-admin/admin.php?page=stla_licenses3.5233.69
Documentation /wp-admin/admin.php?page=stla-documentation3.5231.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 105 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
stla_licenses
widget_recent-comments
gf_stla_reviews_installed_on

Browser metrics Passed 4 tests

A check of browser resources used by Styles & Layouts for Gravity Forms - Best Gravity Forms Styler, Designer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9614.81 ▲0.231.85 ▲0.2542.77 ▲4.85
Dashboard /wp-admin2,248 ▲605.90 ▲0.82106.54 ▼4.8640.74 ▼0.24
Posts /wp-admin/edit.php2,130 ▲382.04 ▲0.0340.38 ▼2.6035.51 ▼3.29
Add New Post /wp-admin/post-new.php1,550 ▲2423.56 ▲0.14625.45 ▼19.8053.65 ▼8.97
Media Library /wp-admin/upload.php1,433 ▲454.22 ▲0.01100.15 ▲0.3744.37 ▲0.32
Add-Ons /wp-admin/admin.php?page=stla-addons1,0012.1727.0731.08
Licenses /wp-admin/admin.php?page=stla_licenses8152.0325.9826.25
Documentation /wp-admin/admin.php?page=stla-documentation1,1792.0322.7747.12

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_theysaidso_widget
    • stla_licenses
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • gf_stla_reviews_installed_on

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/styles-and-layouts-for-gravity-forms/styles-layouts-gravity-forms.php
  • 59× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styles-and-layouts-for-gravity-forms/includes/section-break-title.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/styles-and-layouts-for-gravity-forms/admin-menu/licenses.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/styles-and-layouts-for-gravity-forms/helpers/customizer-controls/desktop-text-input.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styles-and-layouts-for-gravity-forms/includes/radio-inputs.php:3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/styles-and-layouts-for-gravity-forms/includes/section-break-title.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/styles-and-layouts-for-gravity-forms/helpers/customizer-controls/mobile-text-input.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/styles-and-layouts-for-gravity-forms/includes/general-settings.php on line 2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/styles-and-layouts-for-gravity-forms/includes/placeholders.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styles-and-layouts-for-gravity-forms/includes/general-settings.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/styles-and-layouts-for-gravity-forms/includes/field-descriptions.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=stla-documentation
    • > Network (severe)
    wp-content/plugins/styles-and-layouts-for-gravity-forms/css/images/welcome/material.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% 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: gravity forms design, gravity forms themes, gravity forms css, gravity forms material design, gravity forms styler...

styles-and-layouts-for-gravity-forms/styles-layouts-gravity-forms.php 92% from 13 tests

The main PHP file in "Styles & Layouts for Gravity Forms - Best Gravity Forms Styler, Designer" ver. 4.3.11 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("styles-and-layouts-for-gravity-forms.php" instead of "styles-layouts-gravity-forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin11,390 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP421,2561,6058,418
JavaScript55201832,349
CSS313594623

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.24
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods86
▷ Static methods1517.44%
▷ Public methods7789.53%
▷ Protected methods00.00%
▷ Private methods910.47%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
29 PNG files occupy 5.32MB with 1.94MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/style&layoutlogo.png18.37KB5.60KB▼ 69.53%
css/images/welcome/preview.png2.17KB1.51KB▼ 30.48%
css/images/welcome/gird-layout.png0.53KB0.28KB▼ 46.38%
css/images/welcome/cs-theme.png2.43KB1.61KB▼ 33.53%
css/images/welcome/tooltip.png1.88KB1.84KB▼ 2.23%