84% gravity-slider-fields

Code Review | Gravity Slider Fields

WordPress plugin Gravity Slider Fields scored84%from 54 tests.

About plugin

  • Plugin page: gravity-slider-fi...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.02
  • WordPress version: 6.3.1
  • First release: Nov 4, 2014
  • Latest release: Sep 28, 2022
  • Number of updates: 18
  • Update frequency: every 160.3 days
  • Top authors: UaMV (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

4,000+ active /39,609 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.05MB] [CPU: ▼8.49ms] Passed 4 tests

Server-side resources used by Gravity Slider Fields
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.63 ▼4.66
Dashboard /wp-admin3.35 ▲0.0545.63 ▼3.62
Posts /wp-admin/edit.php3.40 ▲0.0548.40 ▼2.64
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.63 ▼23.03
Media Library /wp-admin/upload.php3.27 ▲0.0535.28 ▲0.76

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Slider Fields
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.30 ▼1.451.65 ▼0.5540.40 ▼11.41
Dashboard /wp-admin2,210 ▲255.78 ▼0.09106.07 ▲0.4338.43 ▼5.15
Posts /wp-admin/edit.php2,096 ▲42.04 ▲0.0539.93 ▼10.7336.07 ▼5.65
Add New Post /wp-admin/post-new.php1,521 ▼2123.39 ▲5.18682.98 ▲32.3052.05 ▼0.42
Media Library /wp-admin/upload.php1,398 ▲134.36 ▲0.18110.49 ▲2.9445.75 ▲4.25

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-slider-fields/gravity-slider-fields.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gravity-slider-fields/class-gfsliderfields.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gravity-slider-fields/typewheel-notice/class-typewheel-notice.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention: The official readme.txt is a good inspiration

gravity-slider-fields/gravity-slider-fields.php Passed 13 tests

The main PHP file in "Gravity Slider Fields" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
35 characters long description:
Adds slider fields to Gravity Forms

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin2,977 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript65754591,937
PHP4242296553
CSS5039300
HTML1520137
JSON20040
Markdown17010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity24.75
▷ Minimum class complexity3.00
▷ Maximum class complexity50.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin