Counting lines of code in Jetendo CMS and sites based on it.

  Follow me: Follow Bruce Kirkpatrick by email subscription Bruce Kirkpatrick on Twitter Bruce Kirkpatrick on Facebook
Sun, Jul 21, 2013 at 1:45PM

There didn't seem to be a reliable open source way to count lines of source code for CFML CFC files so I wrote my own and integrated it with the Jetendo CMS Server Manager.  Now you can run a source code line count report across all of the sites or specific directories using the browser interface.  It also attempts to separate HTML, JS, CSS from the CFC and CFM files and counts those separately.

When I ran the report on the Jetendo CMS core project, it returned the following line count info:

17,855 html or text lines in cfc/cfm files
275 CSS lines in cfc/cfm files
4,795 Javascript lines in cfc/cfm files
238 CFC files with 99,529 lines
20 CFM files with 3,274 lines
125,728 total lines

Nearly all of the comments are removed before the code is counted.  This report didn't include the other javascript, css, and php files that are part of the project.  There is around 10,000 more lines if those were included.

Jetendo CMS is also integrated with around 20 different third party open source Javascript projects which amounts to ~40,000 lines of extra code written in HTML, CSS and Javascript.

I also noticed that the average web site I have based on Jetendo CMS is about 1000 lines of code.  We have a few sites that have over 20,000 lines, but most of the code is in the core Jetendo CMS project.

I've worked hard to move all the CFML code into CFCs in the last year and to reduce the amount of redundant or unnecessary source code so I think that Jetendo CMS is compact and well organized at over 125,000 lines of code.  That's a lot of code.  It takes a day to write 500 to 1000 lines of code for most programmers, so recreating Jetendo CMS could take well over 1300 man hours.  Jetendo CMS was refined over many years with thousands of hours put into it.

Bookmark & Share

Popular tags on this blog

Performance |