78% beauty-gravity

Code Review | Beauty Form Styler for Gravity Forms

WordPress plugin Beauty Form Styler for Gravity Forms scored78%from 54 tests.

About plugin

  • Plugin page: beauty-gravity
  • Plugin version: 1.6.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2019
  • Latest release: Apr 26, 2023
  • Number of updates: 84
  • Update frequency: every 14.7 days
  • Top authors: sehreideas (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /25,170 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.36ms] Passed 4 tests

Server-side resources used by Beauty Form Styler for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1938.92 ▼1.13
Dashboard /wp-admin3.44 ▲0.1346.60 ▼17.98
Posts /wp-admin/edit.php3.49 ▲0.1349.77 ▼3.89
Add New Post /wp-admin/post-new.php6.02 ▲0.13105.40 ▲1.57
Media Library /wp-admin/upload.php3.37 ▲0.1338.47 ▲2.66

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Beauty Form Styler for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.19 ▼0.372.34 ▲0.2640.94 ▲0.57
Dashboard /wp-admin2,189 ▲95.68 ▲0.0387.63 ▼14.6543.16 ▲0.38
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0137.10 ▲0.1136.25 ▲2.09
Add New Post /wp-admin/post-new.php1,526 ▼220.88 ▼2.24665.22 ▼13.4145.47 ▼19.97
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.03104.55 ▼3.8345.19 ▼0.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/beauty-gravity/inc/admin.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/beauty-gravity/inc/form_themes.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/beauty-gravity/inc/sibg_backend.php:1099
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/beauty-gravity/inc/sibg_frontend.php:738

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: gravity forms tooltip, gravity forms, gravity forms theme, gravity forms multi-page transition, gravity forms styler

beauty-gravity/beauty_gravity.php 85% from 13 tests

The main PHP script in "Beauty Form Styler for Gravity Forms" version 1.6.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 263 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("beauty-gravity.php" instead of "beauty_gravity.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin8,900 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP108464874,516
CSS54862193,158
JavaScript7270321,122
SVG165077
JSON10027

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity89.67
▷ Minimum class complexity13.00
▷ Maximum class complexity168.00
Average method complexity7.79
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods922.50%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-256x256.png24.00KB5.99KB▼ 75.04%