84% logic-hop-personalization-for-gravity-forms-add-on

Code Review | Logic Hop Personalization for Gravity Forms Add-on

WordPress plugin Logic Hop Personalization for Gravity Forms Add-on scored84%from 54 tests.

About plugin

  • Plugin page: logic-hop-persona...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Mar 6, 2019
  • Latest release: Jul 12, 2021
  • Number of updates: 7
  • Update frequency: every 122.6 days
  • Top authors: logichop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /845 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.04MB] [CPU: ▼7.03ms] Passed 4 tests

Server-side resources used by Logic Hop Personalization for Gravity Forms Add-on
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.17 ▼6.11
Dashboard /wp-admin3.36 ▲0.0145.95 ▼14.18
Posts /wp-admin/edit.php3.47 ▲0.1149.18 ▲2.09
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.26 ▼6.10
Media Library /wp-admin/upload.php3.28 ▲0.0533.27 ▼1.73

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Logic Hop Personalization for Gravity Forms Add-on: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲7113.28 ▼1.311.90 ▼0.1641.76 ▼1.47
Dashboard /wp-admin2,226 ▲374.85 ▼1.07108.62 ▲2.5941.09 ▲3.56
Posts /wp-admin/edit.php2,108 ▲192.01 ▲0.0040.59 ▲4.0736.53 ▲3.41
Add New Post /wp-admin/post-new.php1,540 ▲1618.51 ▼4.67609.95 ▼38.0052.81 ▲2.15
Media Library /wp-admin/upload.php1,402 ▲114.22 ▲0.0497.88 ▲3.2040.51 ▼2.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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)
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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/logic-hop-personalization-for-gravity-forms-add-on/includes/gravity_forms_addon.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: personalized content, gravity forms, form, personalization, logic hop

logic-hop-personalization-for-gravity-forms-add-on/logichop_gravity_forms.php 92% from 13 tests

This is the main PHP file of "Logic Hop Personalization for Gravity Forms Add-on" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("logic-hop-personalization-for-gravity-forms-add-on.php" instead of "logichop_gravity_forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected295 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP352199295

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity25.50
▷ Minimum class complexity7.00
▷ Maximum class complexity44.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin