Unfortunately, we can have terrible code with low complexity or relatively quality code with higher complexity. However, higher complexity could be a sign of a potentially larger problem.
High complexity functions are harder to maintain and prone to more bugs.Higher complexity functions directly lead to more complex unit tests, which can make code difficult to maintain in the long run due to the difficulty of testing. We shouldn’t have illusions about the universality and application of these metrics.
Cyclomatic complexity can be a useful guide or additional rule, but ultimately, we must use our own rules. Of course, additional metrics can raise awareness of code decay.
When and if we combine metrics with aggressive thresholds and firm coding standards, we eventually establish a culture that actively pays attention to code quality.