67% block-styler-for-gravity-forms

Code Review | Block Styler For Gravity Forms

WordPress plugin Block Styler For Gravity Forms scored67%from 54 tests.

About plugin

  • Plugin page: block-styler-for-...
  • Plugin version: 6.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2020
  • Latest release: Aug 24, 2023
  • Number of updates: 8
  • Update frequency: every 159.5 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /543 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.04MB] [CPU: ▲21.17ms] 50% from 4 tests

Analyzing server-side resources used by Block Styler For Gravity Forms
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 2,073.62ms on /wp-admin/options-general.php?page=block-styler-for-gravity-forms)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.04MB on /wp-admin/options-general.php?page=block-styler-for-gravity-forms)
PageMemory (MB)CPU Time (ms)
Home /8.87 ▲5.4166.87 ▲25.36
Dashboard /wp-admin8.89 ▲5.5972.93 ▲21.55
Posts /wp-admin/edit.php8.90 ▲5.5478.60 ▲26.90
Add New Post /wp-admin/post-new.php9.51 ▲3.63114.13 ▲10.87
Media Library /wp-admin/upload.php8.89 ▲5.6769.26 ▲29.25
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8963.79
Block Styler For Gravity Forms /wp-admin/options-general.php?page=block-styler-for-gravity-forms8.902,073.62

Server storage [IO: ▲3.49MB] [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: 245 new files
Database: no new tables, 9 new options
New WordPress options
fs_active_plugins
can_compress_scripts
widget_recent-posts
fs_debug_mode
fs_accounts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Block Styler For Gravity Forms: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8913.18 ▼1.191.60 ▼0.3128.02 ▼18.98
Dashboard /wp-admin2,246 ▲434.80 ▼0.31110.42 ▲3.1643.37 ▼4.17
Posts /wp-admin/edit.php2,126 ▲262.14 ▲0.1236.27 ▲1.1834.93 ▼0.07
Add New Post /wp-admin/post-new.php1,542 ▲1623.76 ▲6.26700.22 ▲59.8168.67 ▲21.34
Media Library /wp-admin/upload.php1,428 ▲314.20 ▼0.0297.07 ▼6.4445.48 ▼0.90
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0901.7223.3428.89
Block Styler For Gravity Forms /wp-admin/options-general.php?page=block-styler-for-gravity-forms9911.8627.9161.38

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/block-styler-for-gravity-forms/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • fs_active_plugins
    • fs_debug_mode
    • can_compress_scripts
    • widget_recent-posts
    • fs_accounts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=block-styler-for-gravity-forms
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 50% 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
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/block-styler-for-gravity-forms/vendor/pimple/pimple/src/Pimple/Psr11/ServiceLocator.php:38
    • > PHP Fatal error
      Trait 'WPT\\GutenbergGravityForm\\Gutenberg\\Style\\DefaultComponentFunctions' not found in wp-content/plugins/block-styler-for-gravity-forms/includes/classes/Gutenberg/Style/SingleValueComponent.php on line 7
    • > PHP Fatal error
      Uncaught Error: Interface 'Pimple\\ServiceProviderInterface' not found in wp-content/plugins/block-styler-for-gravity-forms/vendor/pimple/pimple/src/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Pimple\\Container' not found in wp-content/plugins/block-styler-for-gravity-forms/includes/classes/Loader.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/block-styler-for-gravity-forms/vendor/pimple/pimple/src/Pimple/Tests/PimpleTest.php:35
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/block-styler-for-gravity-forms/vendor/pimple/pimple/src/Pimple/Exception/UnknownIdentifierException.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/block-styler-for-gravity-forms/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/block-styler-for-gravity-forms/vendor/pimple/pimple/src/Pimple/Tests/ServiceIteratorTest.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/block-styler-for-gravity-forms/resources/views/sub_menu.php:2
    • > PHP Fatal error
      Trait 'WPT\\GutenbergGravityForm\\Gutenberg\\Style\\DefaultComponentFunctions' not found in wp-content/plugins/block-styler-for-gravity-forms/includes/classes/Gutenberg/Style/TabbedBackgroundColor.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: gutenberg, gravityforms styler using gutenberg, gravity forms gutenberg, gravityforms gutenberg, gravity forms...

block-styler-for-gravity-forms/block-styler-for-gravity-forms.php 92% from 13 tests

The main PHP file in "Block Styler For Gravity Forms" ver. 6.3.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin36,739 lines of code in 194 files:
LanguageFilesBlank linesComment linesLines of code
PHP1688,54918,40735,989
CSS15240221
JavaScript43459195
JSON300174
reStructuredText19613997
YAML17139
XML12016
Markdown1508

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity52.38
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces15
Interfaces4
Traits1
Classes84
▷ Abstract classes22.38%
▷ Concrete classes8297.62%
▷ Final classes22.44%
Methods1,455
▷ Static methods21714.91%
▷ Public methods1,06473.13%
▷ Protected methods171.17%
▷ Private methods37425.70%
Functions164
▷ Named functions10060.98%
▷ Anonymous functions6439.02%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/block-styler-for-gravity-forms.png11.68KB5.10KB▼ 56.28%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%