84% leadboxer-gravityforms

Code Review | LeadBoxer for Gravity Forms

WordPress plugin LeadBoxer for Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: leadboxer-gravity...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 14, 2022
  • Latest release: Sep 4, 2023
  • Number of updates: 10
  • Update frequency: every 41.8 days
  • Top authors: LeadBoxer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 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.01MB] [CPU: ▼8.31ms] Passed 4 tests

Server-side resources used by LeadBoxer for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.55 ▼12.66
Dashboard /wp-admin3.32 ▲0.0146.80 ▼4.96
Posts /wp-admin/edit.php3.37 ▲0.0150.40 ▼1.91
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.97 ▼13.71
Media Library /wp-admin/upload.php3.24 ▲0.0138.26 ▼0.30

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by LeadBoxer for Gravity Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.80 ▲0.531.90 ▲0.2044.82 ▲4.55
Dashboard /wp-admin2,212 ▲245.83 ▼0.03102.80 ▼3.5440.32 ▼4.80
Posts /wp-admin/edit.php2,100 ▲82.04 ▲0.0540.07 ▼1.3741.09 ▲2.16
Add New Post /wp-admin/post-new.php1,361 ▼15317.18 ▼0.35615.12 ▼65.1760.45 ▲7.34
Media Library /wp-admin/upload.php1,397 ▲94.21 ▲0.04102.91 ▼8.9738.71 ▼8.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/leadboxer-gravityforms/class-leadboxeradd.php:3

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: capture, gravity, form tracking, identify leads, gravity forms...

leadboxer-gravityforms/init.php 92% from 13 tests

The main PHP script in "LeadBoxer for Gravity Forms" version 1.3 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("leadboxer-gravityforms.php" instead of "init.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
Success! There were no dangerous files found in this plugin315 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24913314
JavaScript25161

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity15.50
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin