10% wp-leads-builder-any-crm

Code Review | Lead Form Data Collection to CRM

WordPress plugin Lead Form Data Collection to CRM scored10%from 54 tests.

About plugin

  • Plugin page: wp-leads-builder-...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Oct 18, 2023
  • Number of updates: 95
  • Update frequency: every 34.6 days
  • Top authors: smackcoders (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

700+ active /76,084 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.35ms] Passed 4 tests

An overview of server-side resources used by Lead Form Data Collection to CRM
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.43 ▲1.88
Dashboard /wp-admin3.42 ▲0.0745.84 ▼9.25
Posts /wp-admin/edit.php3.53 ▲0.1849.59 ▲5.89
Add New Post /wp-admin/post-new.php6.00 ▲0.1181.41 ▼23.03
Media Library /wp-admin/upload.php3.34 ▲0.1134.41 ▲1.01
Upgrade to PRO /wp-admin/admin.php?page=wp-pro-page3.3531.75
CRM Configuration /wp-admin/admin.php?page=lb-crmconfig3.4338.47
/wp-admin/admin.php?page=lb-mailsourcing3.3031.67
/wp-admin/admin.php?page=lb-create-contactform3.4932.37
HIRE US /wp-admin/admin.php?page=wp-hireus-page3.3532.80
/wp-admin/admin.php?page=wp-leads-builder-any-crm3.3235.06
Ecom Integ /wp-admin/admin.php?page=lb-ecominteg3.3031.23
/wp-admin/admin.php?page=lb-create-leadform3.3030.95
WP Users Sync /wp-admin/admin.php?page=lb-usersync3.4432.08
CRM Forms /wp-admin/admin.php?page=lb-crmforms3.6133.39

Server storage [IO: ▲7.32MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 105 new files
Database: 6 new tables, 29 new options
New tables
wp_smackformrelation
wp_smackthirdpartyformfieldrelation
wp_smackleadbulider_shortcode_manager
wp_smack_ecom_info
wp_smackleadbulider_form_field_manager
wp_smackleadbulider_field_manager
New WordPress options
smack_wpzohopluspro_user_capture_settings
theysaidso_admin_options
widget_theysaidso_widget
smack_wpsuitepro_usersync_assignedto_settings
smack_wpzohopro_user_capture_settings
WpLeadBuilderProActivatedPlugin
can_compress_scripts
WpLeadThirdPartyPLugin
smack_freshsales_usersync_assignedto_settings
smack_wptigerpro_usersync_assignedto_settings
...

Browser metrics Passed 4 tests

A check of browser resources used by Lead Form Data Collection to CRM
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲18413.64 ▲0.658.65 ▲6.8439.38 ▼4.11
Dashboard /wp-admin2,247 ▲735.53 ▼0.0582.00 ▼6.8373.08 ▲37.68
Posts /wp-admin/edit.php2,156 ▲531.97 ▼0.0539.61 ▼0.9935.64 ▼0.56
Add New Post /wp-admin/post-new.php1,585 ▲5022.99 ▲4.61706.88 ▲96.4158.77 ▼8.42
Media Library /wp-admin/upload.php1,452 ▲584.26 ▲0.0697.47 ▲5.0572.90 ▲31.31
Upgrade to PRO /wp-admin/admin.php?page=wp-pro-page1,0792.4743.2490.56
CRM Configuration /wp-admin/admin.php?page=lb-crmconfig1,3702.2751.0683.40
/wp-admin/admin.php?page=lb-mailsourcing8642.2933.0326.96
/wp-admin/admin.php?page=lb-create-contactform1,5762.8356.4648.66
HIRE US /wp-admin/admin.php?page=wp-hireus-page1,0412.4333.7269.69
/wp-admin/admin.php?page=wp-leads-builder-any-crm1,3662.2141.6442.47
Ecom Integ /wp-admin/admin.php?page=lb-ecominteg9162.4333.7126.24
/wp-admin/admin.php?page=lb-create-leadform1,5792.7657.4841.17
WP Users Sync /wp-admin/admin.php?page=lb-usersync8832.2932.9926.24
CRM Forms /wp-admin/admin.php?page=lb-crmforms9752.4433.6630.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 tables in the database
    • wp_smackformrelation
    • wp_smackthirdpartyformfieldrelation
    • wp_smack_ecom_info
    • wp_smackleadbulider_shortcode_manager
    • wp_smackleadbulider_field_manager
    • wp_smackleadbulider_form_field_manager
  • Zombie WordPress options detected upon uninstall: 29 options
    • smack_wpsuitepro_user_capture_settings
    • db_upgraded
    • smack_wptigerpro_usersync_assignedto_settings
    • widget_recent-comments
    • smack_wpsugarpro_usersync_assignedto_settings
    • smack_wpsalesforcepro_user_capture_settings
    • smack_wpzohopro_usersync_assignedto_settings
    • WpLeadBuilderProActivatedPlugin
    • PrevWpLeadBuilderProActivatedPlugin
    • WP_LEADS_BUILDER_PRO_VERSION
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=lb-mailsourcing
    • > Warning in wp-content/plugins/wp-leads-builder-any-crm/admin/lb-admin.php+134
    include(views/form-campaign.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=lb-mailsourcing
    • > Warning in wp-content/plugins/wp-leads-builder-any-crm/admin/lb-admin.php+134
    include(): Failed opening 'views/form-campaign.php' for inclusion (include_path='.:/usr/share/php')
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/includes/class_lb_manage_shortcodes.php+130
    Undefined index: EditShortcode
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-managefields.php+342
    Undefined index: crmtype
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/includes/class_lb_manage_shortcodes.php+128
    Undefined index: module
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/includes/class_lb_manage_shortcodes.php+131
    Undefined index: onAction
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-managefields.php+92
    Undefined variable: config_fields
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-managefields.php+92
    Trying to get property 'form_type' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-managefields.php+342
    Undefined index:
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-managefields.php+342
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Warning in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-managefields.php+342
    Invalid argument supplied for foreach()
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/includes/LBData.php+267
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/includes/LBData.php+267
    Trying to get property 'shortcode_id' of non-object
    • > GET request to /wp-admin/admin.php?page=lb-ecominteg
    • > Warning in wp-content/plugins/wp-leads-builder-any-crm/admin/lb-admin.php+164
    include(views/form-ecom-integration.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=lb-ecominteg
    • > Warning in wp-content/plugins/wp-leads-builder-any-crm/admin/lb-admin.php+164
    include(): Failed opening 'views/form-ecom-integration.php' for inclusion (include_path='.:/usr/share/php')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-crmforms
    • > Notice in wp-content/plugins/wp-leads-builder-any-crm/includes/Functions.php+36
    Trying to access array offset on value of type bool

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-leads-builder-any-crm/lib/nusoap/nusoap.php
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant SM_LB_PRO_DIR - assumed 'SM_LB_PRO_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-usermodulemapping.php on line 9
    • > PHP Warning
      require_once(SM_LB_PRO_DIRincludes/Functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-usermodulemapping.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'SM_LB_PRO_DIRincludes/Functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-usermodulemapping.php on line 9
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-all-addons.php on line 10
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-all-addons.php on line 10
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-all-addons.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-leads-builder-any-crm/admin/views/form-all-addons.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=lb-create-contactform
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=lb-create-contactform 450:18 Uncaught TypeError: jQuery(...).sortable is not a function
    • > GET request to /wp-admin/admin.php?page=lb-create-contactform
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=lb-create-contactform:392:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).sortable is not a function
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=lb-create-leadform 450:18 Uncaught TypeError: jQuery(...).sortable is not a function
    • > GET request to /wp-admin/admin.php?page=lb-create-leadform
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=lb-create-leadform:392:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=lb-crmforms
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=lb-crmforms 228:10 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots do not have images: #1 (CRM configuration settings), #2 (CRM Forms with Shortcodes), #3 (Inbuilt/Default Form), #4 (Thirdparty Forms), #5 (Form Settings), #6 (WP User Sync)
  • Requires php: Invalid plugin version format
You can take inspiration from this readme.txt

wp-leads-builder-any-crm/index.php 85% from 13 tests

The main PHP script in "Lead Form Data Collection to CRM" version 3.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-leads-builder-any-crm.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 200 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected45,684 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP372,0144,43017,693
CSS111,50215211,628
SVG3009,552
JavaScript71,0504475,058
PO File57051,2601,753

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 146)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity71.63
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity7.84
▷ Minimum method complexity1.00
▷ Maximum method complexity146.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes00.00%
Methods363
▷ Static methods6217.08%
▷ Public methods36299.72%
▷ Protected methods00.00%
▷ Private methods10.28%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 1.58MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/circletick.png0.99KB0.72KB▼ 27.34%
assets/images/err.png1.40KB0.99KB▼ 29.10%
screenshot-2.png124.99KB38.40KB▼ 69.28%
assets/images/joforce-logo.png15.47KB8.97KB▼ 42.05%
screenshot-1.png99.37KB32.24KB▼ 67.56%