microsoft / roosterjs-react
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 231 units with 2,549 lines of code in units (26.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 8 medium complex units (302 lines of code)
    • 17 simple units (496 lines of code)
    • 206 very simple units (1,751 lines of code)
0% | 0% | 11% | 19% | 68%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
tsx0% | 0% | 8% | 24% | 67%
js0% | 0% | 23% | 11% | 65%
ts0% | 0% | 11% | 14% | 73%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/roosterjs-react-command-bar0% | 0% | 30% | 4% | 64%
tools0% | 0% | 23% | 11% | 65%
packages/roosterjs-react-common0% | 0% | 9% | 17% | 73%
packages/roosterjs-react-emoji0% | 0% | 6% | 24% | 69%
packages/roosterjs-react-editor0% | 0% | 5% | 15% | 78%
sample/script0% | 0% | 0% | 81% | 18%
packages/roosterjs-react-ribbon0% | 0% | 0% | 17% | 82%
sample/fabric0% | 0% | 0% | 0% | 100%
packages/roosterjs-react-pickers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private handleShortcuts()
in packages/roosterjs-react-command-bar/lib/plugins/RoosterCommandBarPlugin.ts
50 15 1
private _onKeyDownSuggestingDomEvent()
in packages/roosterjs-react-emoji/lib/plugins/EmojiPlugin.tsx
34 14 1
function output()
in tools/dts.js
61 14 3
private _initButtons()
in packages/roosterjs-react-command-bar/lib/components/RoosterCommandBar.tsx
43 13 1
export function createLinkDialog()
in packages/roosterjs-react-command-bar/lib/components/LinkDialog.tsx
34 12 3
private _getAnchorForClickOpenHyperlink()
in packages/roosterjs-react-editor/lib/components/LeanRooster.tsx
17 12 2
public upload()
in packages/roosterjs-react-common/lib/utils/ImageManager.ts
36 11 3
function main()
in tools/dts.js
27 11 1
private _onKeyUpDomEvent()
in packages/roosterjs-react-emoji/lib/plugins/EmojiPlugin.tsx
22 10 1
export function getCommandFromEvent()
in packages/roosterjs-react-command-bar/lib/plugins/RoosterCommandBarPlugin.Shortcuts.ts
19 9 1
public onPluginEvent()
in packages/roosterjs-react-emoji/lib/plugins/EmojiPlugin.tsx
23 9 1
function parsePair()
in tools/dts.js
20 9 6
public onPluginEvent()
in packages/roosterjs-react-common/lib/plugins/PasteImagePlugin.ts
34 8 1
public componentWillReceiveProps()
in packages/roosterjs-react-editor/lib/components/LeanRooster.tsx
24 8 2
private renderRibbonButton()
in packages/roosterjs-react-ribbon/lib/components/Ribbon.tsx
38 8 1
function createEditor()
in sample/script/FocusOutShellSample.tsx
149 8 2
public move()
in packages/roosterjs-react-common/lib/plugins/UndoWithImagePlugin.ts
24 7 1
private _onKeyUpSuggestingDomEvent()
in packages/roosterjs-react-emoji/lib/plugins/EmojiPlugin.tsx
21 7 1
export function searchEmojis()
in packages/roosterjs-react-emoji/lib/utils/searchEmojis.ts
17 7 2
21 7 1