Framework Average Class Size Comparison

I published some average method complexity statistics yesterday. One rebuttal to those statistics was that Laravel’s average method complexity is low because it has very large classes with lots of small methods. So, I decided to publish the stats for average class length and average complexity per class according to the “phploc” tool.

Again, these metrics are only meant to give a general idea of the style of the code contained in the frameworks’s first-party code. In other words, the code that is actually written and maintained by the framework’s authors and contributors. I personally think each framework listed is well written and exists within the same ballpark standards of “code hygiene”.

Laravel: 17 average length, 5.65 average class complexity

Symfony: 19 average length, 8.82 average class complexity

Zend: 23 average length, 9.85 average class complexity

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.