In relation to a recent announcement from Sebastian Bergmann about the inclusion of Cyclometic Complexity testing in the upcoming PHPUnit release, Jacob Santos has taken a look at its use - find the C.R.A.P. of a process.
The Change Risk Analysis and Predictions (CRAP) index is to give some idea how difficult it would be to maintain the code base. It is not to be used in evaluating how "beautiful" the code is.
He had to modify things slightly in PHPUnit to get it to work with entire files/functions, but it was still simple to use the testing software to create each file's CRAP index. For his examples, he chose the WordPress code and includes the code he used for the tests - two functions: getCCLevel and getCrapIndex. The results of the report are also included.