73% gf-salesmate-add-on

Code Review | Salesmate Add-On for Gravity Forms

WordPress plugin Salesmate Add-On for Gravity Forms scored73%from 54 tests.

About plugin

  • Plugin page: gf-salesmate-add-on
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 12, 2017
  • Latest release: Sep 22, 2023
  • Number of updates: 42
  • Update frequency: every 52.5 days
  • Top authors: salesmate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,716 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.71ms] Passed 4 tests

Server-side resources used by Salesmate Add-On for Gravity Forms
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0046.23 ▼3.36
Dashboard /wp-admin3.31 ▲0.0051.40 ▼5.53
Posts /wp-admin/edit.php3.36 ▲0.0052.01 ▲0.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.50 ▼6.24
Media Library /wp-admin/upload.php3.23 ▲0.0040.02 ▲1.12

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_salesmatelogs
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Salesmate Add-On for Gravity Forms: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.451.76 ▲0.1045.62 ▲3.08
Dashboard /wp-admin2,198 ▲245.58 ▲0.0592.54 ▼8.6840.88 ▼5.34
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0142.07 ▲2.7435.97 ▼1.37
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▼0.07677.30 ▼35.7548.01 ▼7.08
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.07113.30 ▲5.2647.84 ▲0.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_salesmatelogs
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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: Call to undefined function register_activation_hook() in wp-content/plugins/gf-salesmate-add-on/salesmate.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/gf-salesmate-add-on/class-gfsalesmate.php:2

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Settings: Salesmate's credential for activate form feed mapping.), #2 (Feed Page: Create feeds from here for create contacts and deals.), #3 (Field Mapping for Contact: Map Gravity form's field with Salesmate CRM's field to create contact.), #4 (Field Mapping for Deal: Map Gravity form's field with Salesmate CRM's field to create deal.)
Please take inspiration from this readme.txt

gf-salesmate-add-on/salesmate.php 85% from 13 tests

Analyzing the main PHP file in "Salesmate Add-On for Gravity Forms" version 2.0
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-salesmate-add-on.php" instead of "salesmate.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
There were no executable files found in this plugin1,237 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23091661,032
JavaScript1531176
CSS10029

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity62.00
▷ Minimum class complexity2.00
▷ Maximum class complexity122.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants4
▷ Global constants4100.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.18MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshots/screenshot-4.png28.45KB11.24KB▼ 60.50%
images/screenshots/screenshot-2.png36.17KB14.13KB▼ 60.92%
images/screenshots/screenshot-3.png49.68KB20.20KB▼ 59.34%
images/screenshots/screenshot-1.png74.87KB28.13KB▼ 62.43%