Coding Insights to Reduce Future Technical Debt

Program Summary of DELIVER_handler.spsrc

(Compiled On: 2025-03-17 at 08:05:55)

MetricValue
Total Lines of Code (LOC)3864
Total Adjusted LOC3380
Include Files4
Routines61
Variables294
Unused Routines7
Unused Variables4
Clusters1
Arrays0
Database Tables10
Literals1293
Constants0
Pass Statements1
External Libraries0
External Calls0

Summary Notes

Most Complex Routine: do_main_logic -- Complexity: 53)

Suggestions:
  1. Reduce nesting in complex routines.
  2. Replace literals with named constants where reasonable.
  3. Modularize large routines for better readability.

Routine: do_main_logic

Filename: DELIVER_handler.spsrc
Line#: 109

MetricValueStatus
53moderate
130critical
99critical
SuggestionsSimplify logic and decompose into smaller local routines.

Routine: do_signup

Filename: DELIVER_handler.spsrc
Line#: 774

MetricValueStatus
35moderate
69moderate
67critical
SuggestionsSimplify logic and decompose into smaller local routines.

Routine: setup_user_information

Filename: DELIVER_handler.spsrc
Line#: 670

MetricValueStatus
24good
54moderate
55critical
SuggestionsSimplify logic and decompose into smaller local routines.

Routine: display_one_product

Filename: DELIVER_handler.spsrc
Line#: 1747

MetricValueStatus
21good
29good
59critical
SuggestionsSimplify logic and decompose into smaller local routines.

Routine: ajax_validate_user

Filename: ajax_routines.spinc
Line#: 84

MetricValueStatus
18good
19good
18moderate
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_gift_selection

Filename: hx-routines.spinc
Line#: 65

MetricValueStatus
15good
38moderate
31critical
SuggestionsWhere possible, replace literals with named constants.

Filename: DELIVER_handler.spsrc
Line#: 927

MetricValueStatus
14good
17good
21moderate
SuggestionsWhere possible, replace literals with named constants.

Routine: do_reset_one_password

Filename: DELIVER_handler.spsrc
Line#: 1030

MetricValueStatus
12good
24good
22moderate
SuggestionsWhere possible, replace literals with named constants.

Routine: handle_ajax_request

Filename: ajax_routines.spinc
Line#: 21

MetricValueStatus
11good
16good
14good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: find_subvalue

Filename: DELIVER_handler.spsrc
Line#: 1263

MetricValueStatus
11good
125critical
74critical
SuggestionsWhere possible, replace literals with named constants.

Routine: handle_login

Filename: handler_routines.spinc
Line#: 347

MetricValueStatus
9good
56moderate
58critical
SuggestionsWhere possible, replace literals with named constants.

Routine: do_registry_products

Filename: DELIVER_handler.spsrc
Line#: 1611

MetricValueStatus
9good
35moderate
15good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: handle_pw_recovery

Filename: DELIVER_handler.spsrc
Line#: 606

MetricValueStatus
9good
28good
18moderate
SuggestionsRoutine is well-optimized. No changes needed.

Routine: generate_status_html

Filename: DELIVER_handler.spsrc
Line#: 2665

MetricValueStatus
8good
22good
15good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: process_webpage_template

Filename: handler_routines.spinc
Line#: 693

MetricValueStatus
6good
21good
11good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: store_session_record

Filename: handler_routines.spinc
Line#: 473

MetricValueStatus
6good
21good
12good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: make_spoken_time

Filename: DELIVER_handler.spsrc
Line#: 2275

MetricValueStatus
6good
15good
17moderate
SuggestionsRoutine is well-optimized. No changes needed.

Routine: setup_product

Filename: common.spinc
Line#: 26

MetricValueStatus
6good
10good
6good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: check_timeout

Filename: handler_routines.spinc
Line#: 276

MetricValueStatus
6good
13good
4good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: check_new_code

Filename: DELIVER_handler.spsrc
Line#: 1217

MetricValueStatus
5good
18good
7good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_hx

Filename: hx-routines.spinc
Line#: 24

MetricValueStatus
5good
7good
3good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: make_friendly_datetime

Filename: DELIVER_handler.spsrc
Line#: 2221

MetricValueStatus
5good
20good
22moderate
SuggestionsWhere possible, replace literals with named constants.

Routine: output_webpage

Filename: handler_routines.spinc
Line#: 658

MetricValueStatus
3good
11good
4good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_heartbeat

Filename: DELIVER_handler.spsrc
Line#: 2500

MetricValueStatus
3good
50moderate
22moderate
SuggestionsWhere possible, replace literals with named constants.

Routine: check_safename

Filename: DELIVER_handler.spsrc
Line#: 2376

MetricValueStatus
3good
8good
2good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: load_product_data

Filename: DELIVER_handler.spsrc
Line#: 2409

MetricValueStatus
3good
28good
14good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: init_handler

Filename: handler_routines.spinc
Line#: 36

MetricValueStatus
3good
42moderate
21moderate
SuggestionsWhere possible, replace literals with named constants.

Routine: do_process_rec_safename

Filename: DELIVER_handler.spsrc
Line#: 530

MetricValueStatus
3good
21good
12good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: check_for_shutdown

Filename: DELIVER_handler.spsrc
Line#: 577

MetricValueStatus
3good
3good
5good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_heartbeat_update

Filename: DELIVER_handler.spsrc
Line#: 2575

MetricValueStatus
3good
29good
16moderate
SuggestionsRoutine is well-optimized. No changes needed.

Filename: handler_routines.spinc
Line#: 234

MetricValueStatus
3good
16good
7good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: output_pw_reset_page

Filename: DELIVER_handler.spsrc
Line#: 990

MetricValueStatus
3good
10good
6good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: get_window_updates

Filename: DELIVER_handler.spsrc
Line#: 2464

MetricValueStatus
3good
8good
4good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: display_login_webpage

Filename: handler_routines.spinc
Line#: 313

MetricValueStatus
0good
4good
1good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: get_env_variables

Filename: handler_routines.spinc
Line#: 441

MetricValueStatus
0good
7good
4good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: send_signup_email

Filename: DELIVER_handler.spsrc
Line#: 1098

MetricValueStatus
0good
13good
5good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: write_user_audit

Filename: DELIVER_handler.spsrc
Line#: 1137

MetricValueStatus
0good
16good
12good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_confirmation

Filename: DELIVER_handler.spsrc
Line#: 499

MetricValueStatus
0good
9good
8good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_update_preferences

Filename: DELIVER_handler.spsrc
Line#: 442

MetricValueStatus
0good
31moderate
12good
SuggestionsRoutine is well-optimized. No changes needed.

Filename: handler_routines.spinc
Line#: 192

MetricValueStatus
0good
12good
11good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_maybe_allow_address_updates

Filename: DELIVER_handler.spsrc
Line#: 1419

MetricValueStatus
0good
32moderate
25moderate
SuggestionsWhere possible, replace literals with named constants.

Routine: do_maybe_preferences

Filename: DELIVER_handler.spsrc
Line#: 1472

MetricValueStatus
0good
89moderate
101critical
SuggestionsWhere possible, replace literals with named constants.

Filename: DELIVER_handler.spsrc
Line#: 1583

MetricValueStatus
0good
5good
1good
SuggestionsRoutine is well-optimized. No changes needed.

Filename: handler_routines.spinc
Line#: 159

MetricValueStatus
0good
5good
0good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_recent_products

Filename: DELIVER_handler.spsrc
Line#: 1683

MetricValueStatus
0good
4good
1good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_products

Filename: DELIVER_handler.spsrc
Line#: 1708

MetricValueStatus
0good
17good
2good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: check_login

Filename: handler_routines.spinc
Line#: 108

MetricValueStatus
0good
29good
9good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_checkout_products

Filename: DELIVER_handler.spsrc
Line#: 1828

MetricValueStatus
0good
103critical
88critical
SuggestionsWhere possible, replace literals with named constants.

Routine: do_confirmed_products

Filename: DELIVER_handler.spsrc
Line#: 1952

MetricValueStatus
0good
103critical
88critical
SuggestionsWhere possible, replace literals with named constants.

Filename: DELIVER_handler.spsrc
Line#: 2079

MetricValueStatus
0good
9good
5good
SuggestionsRoutine is well-optimized. No changes needed.

Filename: DELIVER_handler.spsrc
Line#: 2180

MetricValueStatus
0good
18good
12good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_update_address

Filename: DELIVER_handler.spsrc
Line#: 383

MetricValueStatus
0good
38moderate
24moderate
SuggestionsWhere possible, replace literals with named constants.

Filename: handler_routines.spinc
Line#: 524

MetricValueStatus
0good
39moderate
22moderate
SuggestionsWhere possible, replace literals with named constants.

Routine: send_email

Filename: DELIVER_handler.spsrc
Line#: 2329

MetricValueStatus
0good
26good
11good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: write_cgi_initial_header

Filename: handler_routines.spinc
Line#: 586

MetricValueStatus
0good
9good
4good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: ajax_write_xml_header

Filename: ajax_routines.spinc
Line#: 149

MetricValueStatus
0good
4good
3good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: write_cgi_content_type

Filename: handler_routines.spinc
Line#: 622

MetricValueStatus
0good
16good
13good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: handle_error

Filename: handler_routines.spinc
Line#: 800

MetricValueStatus
0good
24good
19moderate
SuggestionsRoutine is well-optimized. No changes needed.

Routine: do_substitutions

Filename: handler_routines.spinc
Line#: 752

MetricValueStatus
0good
24good
17moderate
SuggestionsRoutine is well-optimized. No changes needed.

Routine: append_selected_list

Filename: DELIVER_handler.spsrc
Line#: 2630

MetricValueStatus
0good
11good
3good
SuggestionsRoutine is well-optimized. No changes needed.

Routine: write_error

Filename: DELIVER_handler.spsrc
Line#: 1177

MetricValueStatus
0good
11good
7good
SuggestionsRoutine is well-optimized. No changes needed.

Top Significant Include Files

Name

Top Significant Unused Variables

Name

Top Significant Unused Routines

Name

Top Significant Tables

Name

Top Significant Clusters

Name

Top Significant Arrays


Top Significant Pass Statements

Name

Top Significant Library Statements


Top Significant External Calls