I know this is likely to be highly subjective and dependent on implementation, but I'm hoping someone could still provide a little bit of guidance. I'm a new SWE and I'm trying to get a feel for how complex my team's code base is. I've read through the Cognitive Complexity documentation for individual functions, but I'm wondering if there are any general guidelines on how complex the function call stack can/should be. For example, if I have a function that calls another function, which calls another function, my function call stack is only three levels deep, which is still pretty easy to debug and understand conceptually. However, if I have one function that calls 100+ other functions in our code, that starts to get very unwieldy and difficult to really sort through when debugging. Of course, that's partially dependent on how complex the functions are, but even fairly simple functions stacked too far could become pretty tough to navigate.
So with that in mind, are there any guidelines on how to manage your call stack so your code doesn't get too complex for other dev's to be able to sort through? I know this likely wouldn't take the form of "3, maybe 4", but any guidance on how to manage code complexity in this way would be helpful. Thanks!