microsoft / macos-cookbook
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 128 units with 622 lines of code in units (21.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 4 simple units (66 lines of code)
    • 124 very simple units (556 lines of code)
0% | 0% | 0% | 10% | 89%
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
rb0% | 0% | 0% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
libraries0% | 0% | 0% | 12% | 87%
resources0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
20 8 1
type_to_commandline_string
in libraries/plist.rb
20 8 1
18 7 2
minimum_required_os
in libraries/xcode.rb
8 7 0
xcode_list_title
in libraries/xcode.rb
11 5 0
find_apple_id
in libraries/developer_account.rb
12 4 2
plistbuddy_command
in libraries/plist.rb
19 4 4
install_certificate
in libraries/security_cmd.rb
16 4 2
initialize
in libraries/xcode.rb
11 4 1
revision
in libraries/xcode.rb
7 3 0
initialize
in libraries/command_line_tools.rb
7 2 0
latest_from_catalog
in libraries/command_line_tools.rb
7 2 0
catalog_recommendation_label
in libraries/command_line_tools.rb
9 2 0
initialize
in libraries/developer_account.rb
10 2 3
setting_from_plist
in libraries/plist.rb
11 2 2
configured_for_all_users_and_privileges?
in libraries/remote_management.rb
4 2 0
create_keychain
in libraries/security_cmd.rb
6 2 1
desktop?
in libraries/system.rb
4 2 0
portable?
in libraries/system.rb
4 2 0
disabled?
in libraries/system.rb
4 2 0