What is the prefered score range for the code metrics calculation for the following
Developers can use Visual Studio to generate code metrics data that measure the complexity and maintainability of their managed code. Code metrics data can be generated for an entire solution or a single project.
Right-click -> “Calculate Code Metrics.” Once you run the code metrics, Visual Studio will analyze the selected project/projects and display the code metrics results in the “Code Metrics Results” window. From the result window, you can drill down to each and individual method to analyze their metrics data.
From Visual Studio's menu, select Analyze -> Calculate Code Metrics. Then, either select “For Solution”, if you want check all the projects in the solution, or select the project you want. The results will be displayed in the Output window. Visual Studio shows the cyclomatic complexity for each function and property.
The theoretically optimal values are:
There are no hard and fast "good" ranges, though it's possible to make some general statements.
A project could only reach all four values simultaneously by essentially doing nothing and being useless: software that does nothing and depends on nothing is certainly maintainable, but not a very good use of client dollars.
Therefore, all complexity is a tradeoff: additional so-called inherent complexity encodes more sophistication into the program, allowing it to expand the feature set. What you would like to avoid is accidental complexity introduced by a poor or deficient implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With