10% salesforce-wordpress-to-lead

Code Review | Brilliant Web-to-Lead for Salesforce

WordPress plugin Brilliant Web-to-Lead for Salesforce scored 10% from 54 tests.

About plugin

Code review

54 tests

User reviews

38 reviews

Install metrics

4,000+ active / 132,157 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/salesforce-wordpress-to-lead/salesforce.php+1200
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.39MB] [CPU: ▼3.35ms] Passed 4 tests

This is a short check of server-side resources used by Brilliant Web-to-Lead for Salesforce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4047.35 ▲3.10
Dashboard /wp-admin3.69 ▲0.3950.34 ▼0.92
Posts /wp-admin/edit.php3.81 ▲0.4552.48 ▲2.30
Add New Post /wp-admin/post-new.php6.28 ▲0.3989.54 ▼17.88
Media Library /wp-admin/upload.php3.62 ▲0.3942.44 ▲8.36
Salesforce /wp-admin/options-general.php?page=salesforce-wordpress-to-lead3.6032.08

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
salesforce2
can_compress_scripts
widget_salesforce
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Brilliant Web-to-Lead for Salesforce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.21 ▼1.431.95 ▼0.5841.59 ▲3.45
Dashboard /wp-admin2,217 ▲264.86 ▼1.04111.07 ▼3.9041.17 ▼1.78
Posts /wp-admin/edit.php2,101 ▲92.03 ▲0.0139.89 ▼1.1237.31 ▲0.48
Add New Post /wp-admin/post-new.php1,598 ▲6522.03 ▼1.05609.40 ▼28.8234.44 ▼21.08
Media Library /wp-admin/upload.php1,400 ▲154.19 ▼0.0398.75 ▼0.0643.01 ▼0.05
Salesforce /wp-admin/options-general.php?page=salesforce-wordpress-to-lead1,0445.0448.8626.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_salesforce
    • widget_recent-posts
    • salesforce2
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'OV_Plugin_Admin' not found in wp-content/plugins/salesforce-wordpress-to-lead/lib/salesforce_admin.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/salesforce-wordpress-to-lead/lib/salesforce_admin.class.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/salesforce-wordpress-to-lead/lib/salesforce_comment_to_lead.php:65
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/salesforce-wordpress-to-lead/lib/salesforce_widget.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/salesforce-wordpress-to-lead/examples.php:193

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: contact form, case to lead, crm, salesforcecom, salesforce crm...

salesforce-wordpress-to-lead/salesforce.php 85% from 13 tests

The primary PHP file in "Brilliant Web-to-Lead for Salesforce" version 2.7.3.9 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 170 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("salesforce-wordpress-to-lead.php" instead of "salesforce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected3,994 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP101,0876673,413
CSS49010364
JavaScript22117153
YAML10026
HTML10021
Markdown45017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity79.67
▷ Minimum class complexity7.00
▷ Maximum class complexity197.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods129
▷ Static methods32.33%
▷ Public methods11387.60%
▷ Protected methods1612.40%
▷ Private methods00.00%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants23100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.76MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
.wordpress-org/banner-772x250.png96.15KB45.15KB▼ 53.04%
.wordpress-org/screenshot-3.png95.70KB42.63KB▼ 55.45%
.wordpress-org/screenshot-2.png107.70KB45.61KB▼ 57.65%
.wordpress-org/banner-1544x500.png344.45KB161.23KB▼ 53.19%
.wordpress-org/icon-512x512.png41.26KB14.93KB▼ 63.83%