microsoft / winfile
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 158 units with 6,236 lines of code in units (19.3% of code).
    • 10 very long units (1,639 lines of code)
    • 30 long units (2,023 lines of code)
    • 57 medium size units (1,876 lines of code)
    • 35 small units (534 lines of code)
    • 26 very small units (164 lines of code)
26% | 32% | 30% | 8% | 2%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp23% | 38% | 30% | 5% | 1%
c33% | 21% | 26% | 14% | 4%
h0% | 0% | 71% | 0% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src27% | 23% | 30% | 13% | 4%
tools/ExeView24% | 34% | 35% | 3% | 1%
tools/FileSignatureInfo50% | 41% | 6% | 2% | 0%
tools/VerifyResources0% | 60% | 22% | 16% | 1%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
BOOL WFCheckCompress()
in src/wffile.c
206 29 5
HCURSOR MakeCursor()
in tools/ExeView/iconcur.cpp
198 16 1
HICON MakeIcon()
in tools/ExeView/iconcur.cpp
187 16 1
INT SearchList()
in src/wfsearch.c
176 36 8
LRESULT CALLBACK MainWndProc()
in tools/ExeView/main.cpp
170 30 4
BOOL WFDoCompress()
in src/wffile.c
168 33 3
BOOL WFDoUncompress()
in src/wffile.c
158 31 3
int _tmain()
in tools/FileSignatureInfo/FileSignatureInfo.cpp
157 23 2
BOOL DisplayResource()
in tools/ExeView/res.cpp
113 16 3
BOOL GetProgAndPublisherInfo()
in tools/FileSignatureInfo/FileSignatureInfo.cpp
106 14 2
BOOL FillLBWithNewExeHeader()
in tools/ExeView/filllb.cpp
94 4 2
93 18 1
int ReadResourceTable()
in tools/ExeView/exehdr.cpp
91 21 2
BOOL SaveResources()
in tools/ExeView/save.cpp
90 18 3
vector TreeIntersection()
in src/wfgoto.cpp
84 16 1
BOOL FillLBWithEntryTable()
in tools/ExeView/filllb.cpp
82 12 2
BOOL PrintCertificateInfo()
in tools/FileSignatureInfo/FileSignatureInfo.cpp
79 9 1
BOOL VerifyEmbeddedSignature()
in tools/FileSignatureInfo/VerifySignature.cpp
78 9 1
BOOL LoadResourcePacket()
in tools/ExeView/res.cpp
74 11 4
VOID DecodeDialog()
in tools/VerifyResources/VerifyResources.cpp
73 9 2