Skip to main content

Hotspot Analysis Results

Date: 2026-01-09

Executive Summary

The analysis identified 3 Critical Hotspots that represent the highest risk to stability and highest cost of change. These "God Classes" are thousands of lines long and modified weekly.

FileChurn (Commits/Yr)Complexity (LOC)Risk Level
WEPV2ModelBuilder.cs~6117,166🚨 CRITICAL
OrderTravelProductOMGT.cs~397,108🚨 CRITICAL
OrderOMGT.cs~315,113🚨 CRITICAL

Detailed Findings

1. WPV2ModelBuilder.cs

  • Role: Database Context / Model Mapping.
  • Problem: Likely contains all OnModelCreating logic and manual mapping for the entire application.
  • Impact: Any DB schema change requires touching this massive file. Merge conflicts are guaranteed.

2. OrderTravelProductOMGT.cs

  • Role: Core Entity for Order Management (Travel Product).
  • Problem: "God Entity" that likely mixes data, behavior, and persistence logic.
  • Impact: Changes to order logic risk breaking unrelated features due to coupling.

3. OrderOMGT.cs

  • Role: Main Order Entity.
  • Problem: Similar to OrderTravelProductOMGT.cs.
  • Impact: Central point of failure for the OMGT module.

Raw Data

Top 10 Churn (Last 1 Year)

  1. WEPV2ModelBuilder.cs: 61
  2. WEP_BEFR.resx: 58
  3. WepNG_OMGT.csproj: 40
  4. OrderTravelProductOMGT.cs: 39
  5. MaintenanceApp/Program.cs: 33
  6. OrderOMGT.cs: 31
  7. ProductComponentService.cs: 28
  8. CheckoutComponentService.cs: 25
  9. WEPV2DataContext.cs: 23
  10. WepMail.cs: 21

Top 10 Complexity (LOC)

  1. ChartDataRepository.cs: 26,856 (Generated/Library - Ignore)
  2. WEPV2ModelBuilder.cs: 17,166
  3. WEP_BO.Designer.cs: 16,677 (Generated - Ignore)
  4. OrderTravelProductOMGTList.cs: 7,827
  5. WepV2.designer.cs: 7,425 (Generated - Ignore)
  6. OrderTravelProductOMGT.cs: 7,108
  7. InvoicingImport.cs: 5,927
  8. OrderAdvancedSearchQueryBuilder.cs: 5,763
  9. OrderOMGT.cs: 5,113
  10. ACCESS.Designer.cs: 3,707 (Generated - Ignore)

Recommendations

1. WEPV2ModelBuilder.cs (The "Radioactive" Class)

Verdict: ☢️ Treat as Radioactive ☢️. Observation: This file is Auto-Generated by LLBLGen Pro v4.2. Remediation Plan:

  1. Do NOT Refactor Manually: Any manual cleanup will be lost on next regeneration or cause "fighting the generator".
  2. Strict Isolation:
    • Mark file as [GeneratedCode].
    • If you must modify configuration, use the partial class feature. Create WEPV2ModelBuilder.Custom.cs.
  3. Strangulation Strategy (The Escape Hatch):
    • Stop adding new entities to this massive context.
    • For new modules (e.g. Reporting), create a new, lightweight DbContext (e.g. ReportingContext).
    • Migrate highly active modules (like OMGT) to their own independent Contexts gradually.

2. General Hotspots (OrderOMGT, etc.)

  • Split Logic: Use Extension Methods or Partial Classes (short term) or Domain Services (long term) to move logic OUT of the entity.
  • Freeze: Prohibit adding NEW logic to these files. New features must go into new classes.