84% gf-add-on-salesforce

Code Review | Gravity Forms SalesForce Add-On

WordPress plugin Gravity Forms SalesForce Add-On scored84%from 54 tests.

About plugin

  • Plugin page: gf-add-on-salesforce
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Jan 14, 2018
  • Latest release: Jan 15, 2018
  • Number of updates: 11
  • Update frequency: every 0.1 days
  • Top authors: efetech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /935 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Server-side resources used by Gravity Forms SalesForce Add-On
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.16 ▼5.50
Dashboard /wp-admin3.31 ▼0.0346.74 ▼17.43
Posts /wp-admin/edit.php3.37 ▲0.0044.31 ▼5.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0081.26 ▼12.56
Media Library /wp-admin/upload.php3.24 ▲0.0033.41 ▲0.41

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Gravity Forms SalesForce Add-On
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.63 ▲0.251.70 ▼0.1141.90 ▼2.61
Dashboard /wp-admin2,203 ▲155.81 ▼0.0897.99 ▼6.0738.29 ▼3.66
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0239.40 ▲0.0434.90 ▼1.92
Add New Post /wp-admin/post-new.php1,542 ▲2818.32 ▲0.77624.97 ▼43.1859.14 ▼1.55
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.0497.00 ▼5.5243.78 ▼2.56

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 fix the following
  • 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-add-on-salesforce/gravity-forms-salesforce-add-on.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-add-on-salesforce/salesforce.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (View of the Gravity Forms Salesforce Settings screen.), #2 (You can easily configure the field mapping for export to Salesforce using Feeds.), #3 (Select to choose Lead or Contact), #4 (View of Form Feeds. You can have multiple feeds for each form.)
You can look at the official readme.txt

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

The main PHP file in "Gravity Forms SalesForce Add-On" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gf-add-on-salesforce.php" instead of "salesforce.php")

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
Everything looks great! No dangerous files found in this plugin432 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2136132432

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity22.00
▷ Minimum class complexity2.00
▷ Maximum class complexity42.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods317.65%
▷ Public methods1270.59%
▷ Protected methods423.53%
▷ Private methods15.88%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png30.54KB13.15KB▼ 56.96%
screenshot-2.png21.40KB9.35KB▼ 56.28%
screenshot-1.png40.89KB17.11KB▼ 58.16%
screenshot-3.png5.10KB2.41KB▼ 52.69%