78% gravitizer-lite

Code Review | Gravitizer - Material UI Styler for Gravity Forms

WordPress plugin Gravitizer - Material UI Styler for Gravity Forms scored 78% from 54 tests.

About plugin

  • Plugin page: gravitizer-lite
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Aug 14, 2020
  • Latest release: May 20, 2021
  • Number of updates: 15
  • Update frequency: every 18.6 days
  • Top authors: mehbubrashid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,122 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.94ms] Passed 4 tests

An overview of server-side resources used by Gravitizer - Material UI Styler for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.41 ▼0.0524.24 ▼16.67
Dashboard /wp-admin3.33 ▲0.0343.98 ▼3.69
Posts /wp-admin/edit.php3.38 ▲0.0346.93 ▲1.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.46 ▼2.72
Media Library /wp-admin/upload.php3.25 ▲0.0335.83 ▼0.67

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 37 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
maybe_gravitizer_installed
widget_recent-comments
Gravitizer_Lite_Version
how_to_use_notice_dismissed
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Gravitizer - Material UI Styler for Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,584 ▼16214.28 ▼0.1018.88 ▲17.1014.75 ▼32.22
Dashboard /wp-admin2,218 ▲445.84 ▼0.0196.50 ▼3.9040.25 ▼1.37
Posts /wp-admin/edit.php2,104 ▲152.01 ▼0.0839.09 ▲2.6238.42 ▲5.05
Add New Post /wp-admin/post-new.php1,540 ▲718.46 ▼4.61625.16 ▼117.3859.68 ▲4.36
Media Library /wp-admin/upload.php1,406 ▲184.20 ▼0.0194.53 ▼4.1545.07 ▼1.93

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 9 options in the database
    • Gravitizer_Lite_Version
    • widget_recent-posts
    • theysaidso_admin_options
    • maybe_gravitizer_installed
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • how_to_use_notice_dismissed
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-lite-admin-display.php
    • > /wp-content/plugins/gravitizer-lite/public/partials/gravitizer-lite-public-display.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-text-customizer.php on line 2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-wrapper-customizer.php on line 2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-switch-customizer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-radio-customizer.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-text-customizer.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-checkbox-customizer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-dropdown-customizer.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-date-customizer.php on line 2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-dropdown-customizer.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/gravitizer-lite/admin/partials/gravitizer-date-customizer.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: gravity forms styler, gravity forms design, material design, gravity material ui

gravitizer-lite/gravitizer-lite.php Passed 13 tests

The main PHP script in "Gravitizer - Material UI Styler for Gravity Forms" version 2.0.1 is automatically included on every request by WordPress
76 characters long description:
Convert your traditional looking Gravity Forms into Material UI in one click

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected14,975 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript62019011,891
PHP194946932,588
CSS37353496

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 263)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity54.71
▷ Minimum class complexity1.00
▷ Maximum class complexity374.00
Average method complexity10.17
▷ Minimum method complexity1.00
▷ Maximum method complexity263.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected