94% gf-klaviyo-add-on

Code Review | Gravity Forms Klaviyo

WordPress plugin Gravity Forms Klaviyo scored 94% from 53 tests.

About plugin

  • Plugin page: gf-klaviyo-add-on
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 5.8.1
  • First release: Jan 8, 2018
  • Latest release: Mar 30, 2021
  • Number of updates: 15
  • Update frequency: every 78.5 days
  • Top authors: efetech (100%)

Code review

53 tests

User reviews

1 review

Install metrics

900+ active / 2,910 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Gravity Forms Klaviyo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1341.86 ▲21.27
Dashboard /wp-admin3.07 ▲0.0240.64 ▼2.39
Posts /wp-admin/edit.php3.12 ▲0.0244.61 ▼2.59
Add New Post /wp-admin/post-new.php5.43 ▲0.0188.88 ▼1,255.97
Media Library /wp-admin/upload.php3.01 ▲0.0129.51 ▼9.97

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms Klaviyo
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲12015.85 ▲0.049.25 ▲1.2949.55 ▲3.66
Dashboard /wp-admin2,998 ▲1486.18 ▲0.20137.81 ▲8.46103.16 ▼3.41
Posts /wp-admin/edit.php2,706 ▼02.69 ▼0.0165.59 ▼5.0890.81 ▼3.81
Add New Post /wp-admin/post-new.php1,653 ▼19818.82 ▲1.07361.45 ▼8.77110.04 ▼2.97
Media Library /wp-admin/upload.php1,769 ▼64.99 ▼0.02143.12 ▲5.09113.04 ▼9.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gf-klaviyo-add-on/class-gfklaviyofeedaddon.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-klaviyo-add-on/klaviyoaddon.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (You can easily configure the field mapping for export to Klaviyo using Feeds.), #2 (View of the Gravity Forms Klaviyo Settings screen.), #3 (View of Form Feeds. You can have multiple feeds for each form.)
The official readme.txt is a good inspiration

gf-klaviyo-add-on/klaviyoaddon.php 92% from 13 tests

Analyzing the main PHP file in "Gravity Forms Klaviyo" version 1.1
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gf-klaviyo-add-on.php" instead of "klaviyoaddon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin255 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36480255

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods211.76%
▷ Public methods1588.24%
▷ Protected methods211.76%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png21.80KB12.16KB▼ 44.25%
screenshot-2.png39.49KB20.40KB▼ 48.33%
screenshot-1.png38.63KB16.20KB▼ 58.06%