google / blockly-ios
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 75 units with 626 lines of code in units (3.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (27 lines of code)
    • 4 simple units (109 lines of code)
    • 70 very simple units (490 lines of code)
0% | 0% | 4% | 17% | 78%
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
py0% | 0% | 38% | 0% | 61%
js0% | 0% | 0% | 64% | 35%
swift0% | 0% | 0% | 6% | 93%
m0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Scripts0% | 0% | 38% | 0% | 61%
Resources/Non-Localized/CodeGenerator0% | 0% | 0% | 64% | 35%
Sources/Model0% | 0% | 0% | 38% | 61%
Sources/UI/View Controllers0% | 0% | 0% | 0% | 100%
Sources/UI/Views0% | 0% | 0% | 0% | 100%
Sources/ObjC0% | 0% | 0% | 0% | 100%
Sources/Common0% | 0% | 0% | 0% | 100%
Sources/Layout0% | 0% | 0% | 0% | 100%
Sources/UI0% | 0% | 0% | 0% | 100%
Sources/Control0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def update_i18n_messages()
in Scripts/update_i18n_messages.py
27 12 2
domToMutation: function()
in Resources/Non-Localized/CodeGenerator/code_generator_mutators.js
39 10 1
func errorMessage()
in Sources/Model/Connection.swift
23 10 0
domToMutation: function()
in Resources/Non-Localized/CodeGenerator/code_generator_mutators.js
24 7 1
domToMutation: function()
in Resources/Non-Localized/CodeGenerator/code_generator_mutators.js
23 6 1
def read_json_file()
in Scripts/common.py
12 4 1
def pullFile()
in Scripts/pull_web_blockly.py
18 4 2
CodeGeneratorBridge.importBlockDefinitions = function()
in Resources/Non-Localized/CodeGenerator/code_generator_bridge.js
11 3 1
func errorMessage()
in Sources/Model/Connection.swift
15 3 0
func performMutation()
in Sources/UI/Views/MutatorProcedureDefinitionView.swift
15 3 0
CodeGeneratorBridge.generateCodeForWorkspace = function()
in Resources/Non-Localized/CodeGenerator/code_generator_bridge.js
14 2 2
domToMutation: function()
in Resources/Non-Localized/CodeGenerator/code_generator_mutators.js
9 2 1
def git_clone()
in Scripts/common.py
5 2 3
def mapped_language_code()
in Scripts/update_i18n_messages.py
4 2 1
func bky_rangeFromNSRange()
in Sources/Common/RangeHelper.swift
12 2 2
CGFloat BKYEdgeInsetsGetLeft()
in Sources/ObjC/BKYEdgeInsets.m
4 2 1
CGFloat BKYEdgeInsetsGetRight()
in Sources/ObjC/BKYEdgeInsets.m
4 2 1
func refreshView()
in Sources/UI/View Controllers/FieldColorPickerViewController.swift
12 2 0
func loadCategory()
in Sources/UI/View Controllers/ToolboxCategoryListViewController.swift
13 2 2
func updateContentEdgeInsets()
in Sources/UI/View Controllers/ToolboxCategoryViewController.swift
13 2 0