opensearch-project / opensearch-php
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 1,099 units with 10,252 lines of code in units (78.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 10 medium complex units (615 lines of code)
    • 29 simple units (689 lines of code)
    • 1,060 very simple units (8,948 lines of code)
0% | 0% | 5% | 6% | 87%
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
php0% | 0% | 5% | 6% | 87%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
util0% | 0% | 33% | 15% | 50%
src/OpenSearch0% | 0% | 8% | 2% | 89%
src/OpenSearch/Connections0% | 0% | 13% | 28% | 58%
src/OpenSearch/Endpoints0% | 0% | 0% | 4% | 95%
src/OpenSearch/ConnectionPool0% | 0% | 0% | 21% | 78%
src/OpenSearch/Serializers0% | 0% | 0% | 23% | 76%
src/OpenSearch/Namespaces0% | 0% | 0% | 0% | 100%
src/OpenSearch/Helper0% | 0% | 0% | 0% | 100%
src/OpenSearch/Common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public function build()
in src/OpenSearch/ClientBuilder.php
85 23 0
private function wrapHandler()
in src/OpenSearch/Connections/Connection.php
69 16 1
private function skip()
in util/ActionTest.php
53 15 1
private function extractUrl()
in util/Endpoint.php
78 15 1
public function build()
in util/YamlTests.php
108 14 0
public function renderClass()
in util/Endpoint.php
60 14 0
private function catch()
in util/ActionTest.php
44 12 2
private function match()
in util/ActionTest.php
36 11 1
23 11 1
public function renderClass()
in util/ClientEndpoint.php
59 11 0
public function getURI()
in src/OpenSearch/Endpoints/Nodes/Stats.php
22 10 0
private function sniff()
in src/OpenSearch/ConnectionPool/SniffingConnectionPool.php
24 9 1
public function __construct()
in src/OpenSearch/Connections/Connection.php
49 9 6
private function tryDeserializeError()
in src/OpenSearch/Connections/Connection.php
32 9 2
private function do()
in util/ActionTest.php
35 8 1
33 8 0
21 8 0
public function getURI()
in src/OpenSearch/Endpoints/Index.php
24 7 0
public function getURI()
in src/OpenSearch/Endpoints/TermVectors.php
24 7 0
public function getURI()
in src/OpenSearch/Endpoints/Indices/GetFieldMapping.php
24 7 0