94% integration-for-salsa-and-gravity-forms

Code Review | Integration for Salsa and Gravity Forms

WordPress plugin Integration for Salsa and Gravity Forms scored 94% from 54 tests.

About plugin

  • Plugin page: integration-for-s...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.8
  • WordPress version: 5.9.2
  • First release: Aug 12, 2016
  • Latest release: Jul 17, 2021
  • Number of updates: 15
  • Update frequency: every 120.0 days
  • Top authors: drywallbmb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active / 1,897 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼295.20ms] Passed 4 tests

A check of server-side resources used by Integration for Salsa and Gravity Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.75 ▲1.41
Dashboard /wp-admin3.42 ▲0.0132.97 ▼1.15
Posts /wp-admin/edit.php3.65 ▲0.0136.80 ▼0.70
Add New Post /wp-admin/post-new.php6.89 ▼0.0990.05 ▼1,178.18
Media Library /wp-admin/upload.php3.30 ▲0.0023.98 ▼0.76

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Integration for Salsa and Gravity Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲1316.25 ▲0.486.32 ▲0.623.23 ▲0.68
Dashboard /wp-admin2,895 ▲346.11 ▼0.12113.99 ▼27.09154.13 ▼8.63
Posts /wp-admin/edit.php2,691 ▼03.24 ▲0.0063.24 ▼1.24138.90 ▼5.16
Add New Post /wp-admin/post-new.php1,668 ▼4217.98 ▼3.75397.92 ▼61.90156.52 ▼2.90
Media Library /wp-admin/upload.php1,701 ▲35.52 ▼0.03146.55 ▲8.46185.12 ▼3.45

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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)
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/integration-for-salsa-and-gravity-forms/class-gf-salsa.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/integration-for-salsa-and-gravity-forms/gravityforms-salsa.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: forms, integration, crm

integration-for-salsa-and-gravity-forms/gravityforms-salsa.php 85% from 13 tests

"Integration for Salsa and Gravity Forms" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("integration-for-salsa-and-gravity-forms.php" instead of "gravityforms-salsa.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,326 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32493781,271
JavaScript18144
JSON11011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity35.50
▷ Minimum class complexity2.00
▷ Maximum class complexity82.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods49
▷ Static methods714.29%
▷ Public methods4489.80%
▷ Protected methods12.04%
▷ Private methods48.16%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin