10% upi-crm-universal-crm-solution

Code Review | UpiCRM – Lead Management & Affiliates management: Any contact form DB, all leads, Social Networks leads, Google sheets, in one place and more.

WordPress plugin UpiCRM – Lead Management & Affiliates management: Any contact form DB, all leads, Social Networks leads, Google sheets, in one place and more. scored 10% from 54 tests.

About plugin

  • Plugin page: upi-crm-universal...
  • Plugin version: 2.3.8.1
  • PHP version: 7.4.16
  • WordPress version: 5.9.2
  • First release: Mar 31, 2015
  • Latest release: Jan 24, 2022
  • Number of updates: 220
  • Update frequency: every 11.3 days
  • Top authors: upi (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

1,000+ active / 83,314 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/classes/upicrm_fields.php+53
    Undefined variable: arr

Server metrics [RAM: ▲0.24MB] [CPU: ▼297.43ms] Passed 4 tests

This is a short check of server-side resources used by UpiCRM – Lead Management & Affiliates management: Any contact form DB, all leads, Social Networks leads, Google sheets, in one place and more.
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1857.19 ▲1.00
Dashboard /wp-admin3.66 ▲0.2635.64 ▲1.84
Posts /wp-admin/edit.php3.95 ▲0.3139.19 ▼0.47
Add New Post /wp-admin/post-new.php7.19 ▲0.2298.08 ▼1,192.09
Media Library /wp-admin/upload.php3.61 ▲0.3128.60 ▲5.52
GDPR /wp-admin/admin.php?page=upicrm_privacy3.6229.06
Affiliates Center /wp-admin/admin.php?page=upicrm_affiliate3.6339.09
/wp-admin/admin.php?page=upicrm_edit_lead3.5627.16
Export /wp-admin/admin.php?page=upicrm_export3.6422.77
Auto Lead Management /wp-admin/admin.php?page=upicrm_lead_route3.8424.42
Web Services /wp-admin/admin.php?page=upicrm_webservices3.6527.40
Users Center /wp-admin/admin.php?page=upicrm_users_center3.6423.99
Data Types & Fields /wp-admin/admin.php?page=upicrm_settings3.5930.05
/wp-admin/admin.php?page=upicrm_wsp3.5625.14
Import /wp-admin/admin.php?page=upicrm_import3.6425.67

Server storage [IO: ▲21.51MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 715 new files
Database: 14 new tables, 11 new options
New tables
wp_upicrm_fields
wp_upicrm_leads_changes_log
wp_upicrm_webservice_parameters
wp_upicrm_mails
wp_upicrm_options
wp_upicrm_integrations
wp_upicrm_leads_status
wp_upicrm_leads_integration
wp_upicrm_leads_campaign
wp_upicrm_fields_mapping
...
New WordPress options
upicrm_db_version
upicrm_enable_audit_log
upicrm_fix_stange_wordpress_query_bug
upicrm_text_on_lead_clear
upicrm_user_permission_1
upicrm_sender_email
upicrm_email_format
upicrm_default_email
upicrm_default_lead
upicrm_user_permission_2
...

Browser metrics Passed 4 tests

A check of browser resources used by UpiCRM – Lead Management & Affiliates management: Any contact form DB, all leads, Social Networks leads, Google sheets, in one place and more.
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,963 ▲24116.34 ▲0.7011.08 ▲5.502.11 ▲0.03
Dashboard /wp-admin2,963 ▲1026.20 ▲0.01115.15 ▼20.71174.23 ▲6.25
Posts /wp-admin/edit.php2,777 ▲833.12 ▼0.1287.23 ▲23.64162.31 ▲8.86
Add New Post /wp-admin/post-new.php1,735 ▲7417.18 ▲1.19486.79 ▲81.20189.43 ▲15.39
Media Library /wp-admin/upload.php1,781 ▲835.53 ▲0.02133.12 ▼14.01217.90 ▲32.23
GDPR /wp-admin/admin.php?page=upicrm_privacy1,3153.5474.1997.63
Affiliates Center /wp-admin/admin.php?page=upicrm_affiliate2,4353.8075.31107.98
/wp-admin/admin.php?page=upicrm_edit_lead1,1933.4571.1988.78
Export /wp-admin/admin.php?page=upicrm_export1,8984.1677.87114.52
Auto Lead Management /wp-admin/admin.php?page=upicrm_lead_route2,6693.6778.39110.25
Web Services /wp-admin/admin.php?page=upicrm_webservices1,7303.5573.30112.03
Users Center /wp-admin/admin.php?page=upicrm_users_center1,5023.6970.3089.62
Data Types & Fields /wp-admin/admin.php?page=upicrm_settings1,9923.8878.3990.63
/wp-admin/admin.php?page=upicrm_wsp1,5863.6369.24105.79
Import /wp-admin/admin.php?page=upicrm_import1,2953.6769.4892.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall successfully, leaving 14 tables in the database
    • wp_upicrm_integrations
    • wp_upicrm_options
    • wp_upicrm_webservice
    • wp_upicrm_users
    • wp_upicrm_leads_route
    • wp_upicrm_fields_mapping
    • wp_upicrm_leads_integration
    • wp_upicrm_leads_status
    • wp_upicrm_mails
    • wp_upicrm_leads
    • ...
  • Zombie WordPress options detected upon uninstall: 11 options
    • upicrm_enable_audit_log
    • upicrm_db_version
    • upicrm_fix_stange_wordpress_query_bug
    • upicrm_user_permission_2
    • upicrm_default_lead
    • upicrm_email_format
    • upicrm_user_permission_1
    • upicrm_default_email
    • insert_lead_gen
    • upicrm_text_on_lead_clear
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=upicrm_privacy
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/privacy_template.php+48
    Undefined index: from_date
    • > GET request to /wp-admin/admin.php?page=upicrm_privacy
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/privacy_template.php+53
    Undefined index: to_date
    • > GET request to /wp-admin/admin.php?page=upicrm_edit_lead
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_edit_lead.php+6
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=upicrm_edit_lead
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_edit_lead.php+8
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=upicrm_edit_lead
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/classes/upicrm_leads.php+384
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_edit_lead
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_edit_lead.php+30
    Trying to get property 'source_type' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_edit_lead
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_edit_lead.php+30
    Trying to get property 'source_id' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_edit_lead
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_edit_lead.php+47
    Undefined variable: list_option
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_edit_lead
    • > Warning in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_edit_lead.php+72
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=upicrm_export
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/export_template.php+71
    Undefined index: date_start2
    • > GET request to /wp-admin/admin.php?page=upicrm_export
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/export_template.php+73
    Undefined index: date_end2
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_wsp
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_wsp.php+126
    Undefined variable: id
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_lead_route
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/lead_route_form_template.php+299
    Undefined variable: GetLeadsRouteOBJ
    • > GET request to /wp-admin/admin.php?page=upicrm_lead_route
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/lead_route_form_template.php+129
    Trying to get property 'leads_route_rr_users' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+15
    Trying to get property 'webservice_id' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_lead_route
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/lead_route_form_template.php+220
    Trying to get property 'lead_route_mail_no_cc' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_lead_route
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/lead_route_form_template.php+299
    Trying to get property 'lead_route_and' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_lead_route
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/classes/upicrm_integrations.php+41
    Undefined variable: arr
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+48
    Undefined variable: webservice_status
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+57
    Undefined variable: webservice_log
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+64
    Undefined variable: selected
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+72
    Undefined variable: webservice_charset
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key1' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value1' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key2' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value2' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key3' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value3' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key4' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value4' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key5' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value5' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key6' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value6' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key7' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value7' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key8' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value8' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key9' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value9' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+87
    Trying to get property 'webservice_header_key10' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_webservices
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/webservices_template.php+90
    Trying to get property 'webservice_header_value10' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_users_center
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/users_form_template.php+44
    Undefined variable: GetUserOBJ
    • > GET request to /wp-admin/admin.php?page=upicrm_users_center
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/users_form_template.php+5
    Trying to get property 'inside_id' of non-object
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_users_center
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/users_form_template.php+38
    Trying to get property 'user_id' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_users_center
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/users_form_template.php+12
    Trying to get property 'user_parent_id' of non-object
    • > GET request to /wp-admin/admin.php?page=upicrm_users_center
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/template/users_form_template.php+16
    Trying to get property 'user_label' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=upicrm_wsp
    • > Notice in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_wsp.php+308
    Undefined variable: webservice_id

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/PHPExcel/Shared/PCLZip/pclzip.lib.php
    • > /wp-content/plugins/upi-crm-universal-crm-solution/template/dashboard_template.php
  • 306× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/upi-crm-universal-crm-solution/admin/upicrm_wsp.php:382
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/upi-crm-universal-crm-solution/functions.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/Google/Service/Fusiontables.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/Google/Service/MapsEngine.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/PHPExcel/Writer/Excel2007/Worksheet.php:71
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Worksheet_BaseDrawing' not found in wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/PHPExcel/Worksheet/MemoryDrawing.php:71
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/upi-crm-universal-crm-solution/libraries/upicrm_elementor.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/Google/Service/Storage.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'SmartUI' not found in wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/smartui/class.smartui-button.php:5
    • > PHP Warning
      require_once(wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/Google/IO): failed to open stream: No such file or directory in /var/www/wordpress/wp-content/plugins/upi-crm-universal-crm-solution/resources/includes/Google/IO/Curl.php on line 47

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
9 plugin tags: lead management, lead tracking, elementor contact forms db, social networks leads, lead distribution...

upi-crm-universal-crm-solution/upicrm.php 77% from 13 tests

The main PHP script in "UpiCRM – Lead Management & Affiliates management: Any contact form DB, all leads, Social Networks leads, Google sheets, in one place and more." version 2.3.8.1 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("upi-crm-universal-crm-solution.php" instead of "upicrm.php")

Code Analysis 95% from 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 plugin258,597 lines of code in 457 files:
LanguageFilesBlank linesComment linesLines of code
PHP39421,67463,052203,721
CSS194313,67146,013
JavaScript356555515,706
PO File59641,8812,501
SVG200643
XML20013

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,176)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.19
▷ Minimum class complexity1.00
▷ Maximum class complexity1,176.00
Average method complexity1.49
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces0
Interfaces8
Traits0
Classes2,964
▷ Abstract classes120.40%
▷ Concrete classes2,95299.60%
▷ Final classes00.00%
Methods24,554
▷ Static methods6572.68%
▷ Public methods23,95697.56%
▷ Protected methods630.26%
▷ Private methods5352.18%
Functions144
▷ Named functions4531.25%
▷ Anonymous functions9968.75%
Constants1,054
▷ Global constants12311.67%
▷ Class constants93188.33%
▷ Public constants931100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
113 PNG files occupy 3.76MB with 1.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-11.png82.26KB21.64KB▼ 73.69%
resources/img/jqueryui/ui-icons_454545_256x240.png3.62KB4.11KB0.00%
resources/img/gradient/login.png0.79KB0.84KB0.00%
assets/screenshot-5.png23.10KB8.70KB▼ 62.34%
assets/icon-256x256.png9.88KB4.89KB▼ 50.49%