A few days ago I was astonished to read this tweet:
@photomatt did you really say "@WordPress will be 90% Javascript in the next few years" or was that a misquote?
— eric (@ericandrewlewis) June 7, 2014
which even after Andrew Nacin tuned down the statement a little bit:
@ericandrewlewis @photomatt @WordPress I know both of us had said things along these lines, not sure I’ve heard (or believe) 90%, though.
— Andrew Nacin (@nacin) June 7, 2014
and Macs and More clarified the possible context of the initial quote
@photomatt @nacin @ericandrewlewis I believe the quote was “90% of development” would be about Javascript. — Macs and More DH (@MacsandMoreDH) June 7, 2014
Still shows that we may need to revisit soon the typical WordPress definition (from Wikipedia):
“WordPress is […] a content management system (CMS) based on PHP and MySQL.”
In fact, this was confirmed by Matt Mullenweg himself that chimed in to explain that
@nacin @ericandrewlewis I’d agree with @nacin – 1/ Infrastructure stuff will likely remain majority PHP (updates, APIs, auth, DB layer)
— Matt Mullenweg (@photomatt) June 7, 2014
and
@nacin @ericandrewlewis 2/ Most interesting user-facing improvements will be JS-driven, most already are. (editor, media, customizer, menus) — Matt Mullenweg (@photomatt) June 7, 2014
At this point I thought it would be interesting to take a closer look at the evolution of JavaScript code in WordPress since its first release (list of releases analyzed taken from the release archive).
If we look at the evolution of the number of JavaScript files in a default WordPress installation…
and its number of JavaScript lines of code
we clearly a steep progression of the role of JavaScript in WordPress (from one single file to 270 and from merely 162 lines of code to more than 40.000). Nevertheless, this growth must be put in the context of the growth of the overall WordPress codebase which has been also remarkable (as for most software projects, size is always increasing!).
which means that JavaScript represents (as of today) 16.6% of the total source code of WordPress while PHP is the other 83.4%. To simplify I obviate any other kind of file like CSS, HTML, …
So, JavaScript is not taking over WordPress (yet) but based on these numbers and Matt’s opinion, it seems that if you want to call yourself a WordPress Developer (btw, Google says that there are over 600.000 “WordPress Developers” pages indexed), you may want to start learning a little bit of JavaScript apart from PHP.
Featured Image provided by Dmitry Baranovskiy.
Leave a Reply