So there are quite a few components to code optimisation and refactoring of code.
The largest indicator for me is cyclomatic complexity, I work on the bases of anything over 7 should be refactored.
I want other methods of detecting code issues with large projects that other people use, specifically with SharePoint.
Regards,
Hugh
I would definitely suggest SPCAF/SPCAFContrib for the deep and custom analysis of both XML/SharePoint object model.
On the other hand, cyclomatic complexity might not the critical as code works well with both high/low cyclomatic complexity. So, unless “developers just want to be perfect”, in the real life and project it might be quite hard to get the budget, time and, finally, people who understand what CC is 🙂