10% via-crm-forms

Code Review | VIA Lead Integration for Gravity Forms and Salesforce

WordPress plugin VIA Lead Integration for Gravity Forms and Salesforce scored10%from 54 tests.

About plugin

  • Plugin page: via-crm-forms
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Jan 14, 2020
  • Latest release: Sep 1, 2020
  • Number of updates: 12
  • Update frequency: every 19.8 days
  • Top authors: viastudio (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /504 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ViaGF\Loader::activatePlugin() should not be called statically

Server metrics [RAM: ▲0.11MB] [CPU: ▼11.96ms] Passed 4 tests

Analyzing server-side resources used by VIA Lead Integration for Gravity Forms and Salesforce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3642.74 ▼2.10
Dashboard /wp-admin3.47 ▲0.1733.52 ▼15.90
Posts /wp-admin/edit.php3.54 ▲0.1939.22 ▼11.82
Add New Post /wp-admin/post-new.php5.73 ▼0.1678.00 ▼18.01
Media Library /wp-admin/upload.php3.48 ▲0.2533.07 ▼1.10

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 159 new files
Database: 1 new table, 8 new options
New tables
wp_gf_viagf_meta
New WordPress options
viagf_name_field
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
viagf_version
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for VIA Lead Integration for Gravity Forms and Salesforce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.63 ▼0.805.73 ▲3.8735.62 ▼7.71
Dashboard /wp-admin2,225 ▲345.83 ▲0.96108.62 ▲2.9938.27 ▼6.54
Posts /wp-admin/edit.php2,111 ▲222.02 ▲0.0143.73 ▲3.9136.49 ▼1.79
Add New Post /wp-admin/post-new.php1,552 ▲1923.18 ▼0.08682.91 ▼4.6154.18 ▼5.73
Media Library /wp-admin/upload.php1,401 ▲164.27 ▲0.0898.68 ▼6.3242.43 ▲0.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ViaGF\Loader::deactivatePlugin() should not be called statically
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_gf_viagf_meta
  • The uninstall procedure has failed, leaving 8 options in the database
    • viagf_name_field
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • viagf_version

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 everything seems fine, this is not 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
Please fix the following items
  • 51× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/via-crm-forms/vendor/guzzlehttp/psr7/src/BufferStream.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/via-crm-forms/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/via-crm-forms/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/via-crm-forms/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
    • > PHP Warning
      require_once(wp-content/plugins/via-crm-forms/vendor/viastudio/via-php-license/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/via-crm-forms/vendor/viastudio/via-php-license/via-php-license.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/via-crm-forms/vendor/symfony/dotenv/Tests/DotenvTest.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/via-crm-forms/vendor/symfony/dotenv/Exception/PathException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/via-crm-forms/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/via-crm-forms/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/via-crm-forms/vendor/guzzlehttp/promises/src/AggregateException.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Enter the Salesforce account and API information in the plugin settings to activate the plugin.) image not found
Please take inspiration from this readme.txt

via-crm-forms/via-gravityforms-salesforce.php 85% from 13 tests

The main file in "VIA Lead Integration for Gravity Forms and Salesforce" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Git Repository: A Git repository was detected inside this plugin
  • Main file name: The principal plugin file should be the same as the plugin slug ("via-crm-forms.php" instead of "via-gravityforms-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 plugin13,401 lines of code in 141 files:
LanguageFilesBlank linesComment linesLines of code
PHP1121,9634,9689,470
Markdown1294103,156
JSON1100638
CSS19175
XML23046
make1409
JavaScript10194
Bourne Shell1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.88
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces16
Interfaces15
Traits3
Classes78
▷ Abstract classes00.00%
▷ Concrete classes78100.00%
▷ Final classes1114.10%
Methods712
▷ Static methods7210.11%
▷ Public methods58181.60%
▷ Protected methods81.12%
▷ Private methods12317.28%
Functions161
▷ Named functions6339.13%
▷ Anonymous functions9860.87%
Constants59
▷ Global constants23.39%
▷ Class constants5796.61%
▷ Public constants57100.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
There are no PNG files in this plugin