Joomla 1.6 vs Joomla 1.5: By The Numbers

A couple weeks ago, Joomla 1.6 beta 4 was released. Joomla 1.6 offers many great new features and improvements, which have been covered at length by other websites and blogs.

What makes this blog unique is that it focuses on the very core of Joomla: it’s code base. To analyze the code bases of Joomla 1.5 and Joomla 1.6 beta 4, we used the tool PHPloc, created by Sebastian Bergmann.

PHPloc analysis

Joomla 1.6 has over 100.000 lines of code less than Joomla 1.5. This is a difference of more than 35%! The complete rewrite of the code base for Joomla 1.6 seems to have created more efficient code that can handle more features with far less lines of code.

Of the total 320.215 lines of code that are in Joomla 1.5, there are 100.813 lines of code that are in fact comments and 219.502 lines of actual code. This creates a percentage of 31.47% commented lines versus the total number lines of code. With Joomla 1.6, the numbers are 73.058 commented lines versus 133.885 non-commented lines, which adds up to 35.30% comments. That fact leads me to conclude that the code in Joomla 1.6 is better commented than the code in Joomla 1.5. This is a great improvement for premium Joomla templates and extensions developers, as they can now understand the code in Joomla even better.

In PHP 5, methods or properties can be declared as public (= accessible by any other class), protected (= accessible by the class itself and any extended class) or private (= accessible only by the class itself). In PHP 4 this was not possible yet, so every line of code was declared as public. The difference in the graph above is caused by the fact that Joomla 1.6 is finally built on proper PHP 5 code.

I’m not able to explain the enormous differences in the graphs above. It seems that there is a big difference between Joomla 1.5 and Joomla 1.6 in both the amount of functions and constants used in the code. Especially the fact that Joomla 1.6 used less than 5% of the amount of constants used in Joomla 1.5 surprises me.

Can somebody offer an explanation for these differences?

Joomla 3 Search Engine Optimization

Receive this 14-page illustrated free ebook written by Joomla SEO expert Theo van der Zee when you subscribe to our newsletter.

Recommended for you

  •   Differentiate a Joomla 1.5 From a Joomla 1.6 Website
  •   Upgrading a Joomla 1.5 Module to Joomla 1.6
  •   Joomla 1.6 vs Joomla 1.5: templateDetails.xml

Comments are currently closed.