fbsamples / cp_reference
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 109 units with 1,467 lines of code in units (10.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (41 lines of code)
    • 13 simple units (324 lines of code)
    • 95 very simple units (1,102 lines of code)
0% | 0% | 2% | 22% | 75%
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% | 2% | 22% | 75%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
order0% | 0% | 6% | 21% | 72%
catalog0% | 0% | 0% | 17% | 82%
fb_metadata0% | 0% | 0% | 42% | 57%
shop0% | 0% | 0% | 21% | 78%
webhook0% | 0% | 0% | 43% | 56%
config0% | 0% | 0% | 73% | 26%
core0% | 0% | 0% | 0% | 100%
member0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def fetch_and_ack_orders()
in order/utils/order_actions.py
41 14 1
def write_orders()
in order/utils/order_actions.py
59 10 2
def get_reqd_headings_list()
in catalog/models/products.py
24 9 1
def fulfill_order_async()
in order/tasks.py
21 8 4
def webhooks()
in webhook/views.py
23 7 1
def fbe()
in fb_metadata/views.py
29 7 2
def process_list_order_response()
in order/utils/order_actions.py
23 6 1
def fulfillOrder()
in order/views.py
27 6 3
def fbe_callback()
in fb_metadata/views.py
37 6 1
def allStoresContext()
in config/context_processors.py
11 6 1
def has_variation_info()
in catalog/models/products.py
2 6 1
def _variation_eq()
in catalog/models/products.py
12 6 2
def createProduct()
in catalog/views.py
33 6 2
def updateStore()
in shop/views.py
23 6 2
def _need_variation_field()
in catalog/models/products.py
6 5 3
def viewProducts()
in catalog/views.py
18 5 2
def viewProduct()
in catalog/views.py
17 5 3
def updateProduct()
in catalog/views.py
23 5 3
40 5 1
def viewOrders()
in order/views.py
13 4 2