83% styler-for-gravity-forms

Code Review | Styler for Gravity Forms

WordPress plugin Styler for Gravity Forms scored83%from 54 tests.

About plugin

  • Plugin page: styler-for-gravit...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Feb 15, 2017
  • Latest release: Mar 4, 2022
  • Number of updates: 17
  • Update frequency: every 108.4 days
  • Top authors: ideaboxcreations (94.12%)simrandeep (11.76%)

Code review

54 tests

User reviews

17 reviews

Install metrics

5,000+ active /48,858 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 gracefully, with no errors

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

Analyzing server-side resources used by Styler for Gravity Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.96 ▼2.48
Dashboard /wp-admin3.31 ▲0.0044.05 ▼5.49
Posts /wp-admin/edit.php3.36 ▲0.0044.99 ▼4.81
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.72 ▼19.82
Media Library /wp-admin/upload.php3.23 ▲0.0035.23 ▲1.66

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Styler for Gravity Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.131.73 ▼0.2746.13 ▲2.17
Dashboard /wp-admin2,209 ▲214.80 ▼1.07110.27 ▼5.6940.94 ▼5.49
Posts /wp-admin/edit.php2,092 ▼02.02 ▼0.0241.47 ▼1.9935.09 ▼3.14
Add New Post /wp-admin/post-new.php1,533 ▲923.16 ▼0.34662.25 ▲3.0353.25 ▼3.60
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0594.49 ▼5.5542.21 ▼3.81

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/styler-for-gravity-forms/includes/class-ib-customizer.php:58
    • > PHP Fatal error
      require_once(): Failed opening required 'GFS_DIRincludes/class-ib-customizer.php' (include_path='.:/usr/share/php') in wp-content/plugins/styler-for-gravity-forms/includes/customizer.php on line 3
    • > PHP Warning
      require_once(GFS_DIRincludes/class-ib-customizer.php): failed to open stream: No such file or directory in wp-content/plugins/styler-for-gravity-forms/includes/customizer.php on line 3
    • > PHP Warning
      Use of undefined constant GFS_DIR - assumed 'GFS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/styler-for-gravity-forms/includes/customizer.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

styler-for-gravity-forms/gravityforms-styler.php 85% from 13 tests

The principal PHP file in "Styler for Gravity Forms" v. 1.2.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("styler-for-gravity-forms.php" instead of "gravityforms-styler.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected3,300 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41372203,300

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.80
Average class complexity27.00
▷ Minimum class complexity15.00
▷ Maximum class complexity39.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods20
▷ Static methods1470.00%
▷ Public methods1365.00%
▷ Protected methods630.00%
▷ Private methods15.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png30.43KB10.62KB▼ 65.10%