<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: WordPress code quality</title>
	<atom:link href="http://mgeisler.net/2005/05/wordpress-code-quality/feed/" rel="self" type="application/rss+xml" />
	<link>http://mgeisler.net/2005/05/wordpress-code-quality/</link>
	<description>Adventures with Computers</description>
	<pubDate>Thu, 02 Sep 2010 20:12:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6-bleeding</generator>
		<item>
		<title>By: Jason Judge</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-376756</link>
		<dc:creator>Jason Judge</dc:creator>
		<pubDate>Sat, 05 Sep 2009 12:30:43 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-376756</guid>
		<description>&lt;p&gt;Four years on, and the code is still a right old mess.&lt;/p&gt;

&lt;p&gt;I've just taken a look at the admin scripts today for the first time, as my WP site was hacked. I nearly fainted - it looks like something written ten years ago by an absolute beginner.&lt;/p&gt;

&lt;p&gt;The main complaint I have, is that they don't write code with safety in mind. By that, I mean code that will be resilient to the next developer coming along and changing it. Just enforcing the use of {curly braces} within if {...} else {...} statements would go a long, long way to avoiding stupid bugs.&lt;/p&gt;

&lt;p&gt;Then there is code and HTML mixed in the admin scripts - very hard to read and follow.&lt;/p&gt;

&lt;p&gt;Lastly (from my fairly quick perusal) - references to _POST all over the place. Instead of a single entry point to pick up use data and validate it at the same time, scripts reference _POST freely everywhere, and validate it using preg_replace() too. There is no one place where the code can say "give me variable foo and make sure it is an integer". That is leaving the door wide open to stupid validation errors and hacks.&lt;/p&gt;

&lt;p&gt;And that, appears to be what has happened to my site.&lt;/p&gt;

&lt;p&gt;It is time the code base was dicarded and rewritten with fewer entry points, less duplication, everything (and I mean ALL code) wrapped up in objects and functions, rather than being global in-line, and a better system for handling user input.&lt;/p&gt;

&lt;p&gt;I daren't look at how the database access is handled...&lt;/p&gt;

&lt;p&gt;-- Jason&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Four years on, and the code is still a right old mess.</p>
<p>I&#8217;ve just taken a look at the admin scripts today for the first time, as my WP site was hacked. I nearly fainted - it looks like something written ten years ago by an absolute beginner.</p>
<p>The main complaint I have, is that they don&#8217;t write code with safety in mind. By that, I mean code that will be resilient to the next developer coming along and changing it. Just enforcing the use of {curly braces} within if {&#8230;} else {&#8230;} statements would go a long, long way to avoiding stupid bugs.</p>
<p>Then there is code and HTML mixed in the admin scripts - very hard to read and follow.</p>
<p>Lastly (from my fairly quick perusal) - references to _POST all over the place. Instead of a single entry point to pick up use data and validate it at the same time, scripts reference _POST freely everywhere, and validate it using preg_replace() too. There is no one place where the code can say &#8220;give me variable foo and make sure it is an integer&#8221;. That is leaving the door wide open to stupid validation errors and hacks.</p>
<p>And that, appears to be what has happened to my site.</p>
<p>It is time the code base was dicarded and rewritten with fewer entry points, less duplication, everything (and I mean ALL code) wrapped up in objects and functions, rather than being global in-line, and a better system for handling user input.</p>
<p>I daren&#8217;t look at how the database access is handled&#8230;</p>
<p>&#8211; Jason</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RaiulBaztepo</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-357750</link>
		<dc:creator>RaiulBaztepo</dc:creator>
		<pubDate>Sat, 28 Mar 2009 22:30:11 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-357750</guid>
		<description>&lt;p&gt;Hello!
Very Interesting post! Thank you for such interesting resource! 
PS: Sorry for my bad english, I'v just started to learn this language ;)
See you! 
Your, Raiul Baztepo&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hello!<br />
Very Interesting post! Thank you for such interesting resource!<br />
PS: Sorry for my bad english, I&#8217;v just started to learn this language ;)<br />
See you!<br />
Your, Raiul Baztepo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lenz</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-352899</link>
		<dc:creator>Lenz</dc:creator>
		<pubDate>Sun, 15 Mar 2009 12:53:14 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-352899</guid>
		<description>&lt;p&gt;Hi Martin,
gladly i found someone who shares my opinion. Never saw such a messed up code like Wordpress.
Opening any file feels like 1995. This is not "State of the Art".This is no art at all.
I am truly disappointed. Wordpress is soo shiny, easy to use ans user friendly but from a programmers point of view
it is just a piece of crap.&lt;/p&gt;

&lt;p&gt;How can the config file be part of the call-cain?
How can one mix HTML, CSS, Javascript and PHP in one file in the year 2009?
How can you programm a wide spread web app with the "one site one file" paradigm these days.
They truely need some design patterns! 
FrontController, Model View Controller, Active Record and Decorator Pattern would be a good start.&lt;/p&gt;

&lt;p&gt;True - you don´t have to be pretty to be famous.
But you have to have values to be worth something. (Hope this expression works in english ;) )&lt;/p&gt;

&lt;p&gt;Lenz&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Martin,<br />
gladly i found someone who shares my opinion. Never saw such a messed up code like Wordpress.<br />
Opening any file feels like 1995. This is not &#8220;State of the Art&#8221;.This is no art at all.<br />
I am truly disappointed. Wordpress is soo shiny, easy to use ans user friendly but from a programmers point of view<br />
it is just a piece of crap.</p>
<p>How can the config file be part of the call-cain?<br />
How can one mix HTML, CSS, Javascript and PHP in one file in the year 2009?<br />
How can you programm a wide spread web app with the &#8220;one site one file&#8221; paradigm these days.<br />
They truely need some design patterns!<br />
FrontController, Model View Controller, Active Record and Decorator Pattern would be a good start.</p>
<p>True - you don´t have to be pretty to be famous.<br />
But you have to have values to be worth something. (Hope this expression works in english ;) )</p>
<p>Lenz</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Php ...php4 php5 php6.. Php.... - SinhViênIT.Net &#124;&#124;Diễn Đàn Sinh Viên CNTT</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-349798</link>
		<dc:creator>Php ...php4 php5 php6.. Php.... - SinhViênIT.Net &#124;&#124;Diễn Đàn Sinh Viên CNTT</dc:creator>
		<pubDate>Fri, 06 Mar 2009 08:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-349798</guid>
		<description>&lt;p&gt;[...] PHP6?  Wordpress đâu phải có chất lượng mã (code) tuyệt vời mà ngược lại. Martin Geisler Online Blog Archive WordPress code quality  Nhưng chất lượng mã của Wordpress dở ẹc, việc Wordpress dùng PHP5 hay không, [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] PHP6?  Wordpress đâu phải có chất lượng mã (code) tuyệt vời mà ngược lại. Martin Geisler Online Blog Archive WordPress code quality  Nhưng chất lượng mã của Wordpress dở ẹc, việc Wordpress dùng PHP5 hay không, [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Web Development Frameworks at Endlessly Curious</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-308479</link>
		<dc:creator>Web Development Frameworks at Endlessly Curious</dc:creator>
		<pubDate>Thu, 13 Nov 2008 08:42:43 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-308479</guid>
		<description>&lt;p&gt;[...] the months, I&#8217;ve noticed that it is not the prettiest of code in place and again I&#8217;m not alone in noticing [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] the months, I&#8217;ve noticed that it is not the prettiest of code in place and again I&#8217;m not alone in noticing [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph Scott&#8217;s Blog &#187; You Don&#8217;t Have To Be Pretty To Be Successful</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-292</link>
		<dc:creator>Joseph Scott&#8217;s Blog &#187; You Don&#8217;t Have To Be Pretty To Be Successful</dc:creator>
		<pubDate>Mon, 06 Jun 2005 17:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-292</guid>
		<description>&lt;p&gt;[...]  hundreds of defined functions.  I&#8217;m certainly not the only one to write about this, Martin Geisler posted a list recently.     Martin mentions things like excessive use of globa [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...]  hundreds of defined functions.  I&#8217;m certainly not the only one to write about this, Martin Geisler posted a list recently.     Martin mentions things like excessive use of globa [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LightPress &#187; WordPress is fast, MySQL is slow? FUD at work</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-276</link>
		<dc:creator>LightPress &#187; WordPress is fast, MySQL is slow? FUD at work</dc:creator>
		<pubDate>Thu, 02 Jun 2005 10:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-276</guid>
		<description>&lt;p&gt;[...] ce of technology and a very fast database, the same cannot be said for WP's code (see also this), db design and queries. For simple things (INSERTS and SELECTS) MySQL often beats th [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] ce of technology and a very fast database, the same cannot be said for WP&#8217;s code (see also this), db design and queries. For simple things (INSERTS and SELECTS) MySQL often beats th [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Geisler</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-261</link>
		<dc:creator>Martin Geisler</dc:creator>
		<pubDate>Sun, 29 May 2005 13:27:38 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-261</guid>
		<description>&lt;p&gt;I think you're right about WordPress needing some refactoring and rewriting.  When I brought my complains to the mailinglist I was &lt;a href="http://textdrive.com/pipermail/wp-hackers/2005-May/001114.html"&gt;told by Matt&lt;/a&gt; that the code base was very mature because of their old roots in b2.&lt;/p&gt;

&lt;p&gt;Having old roots might make the code seem mature, but for me mature code also has to be well documented, something which the WordPress code cannot claim to be.&lt;/p&gt;

&lt;p&gt;I have not yet tried &lt;a href="http://lightpress.org/"&gt;LightPress&lt;/a&gt;, but maybe I will.  Since it runs on top of WordPress I imagine that switching will be easy.  Thanks for the tip.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think you&#8217;re right about WordPress needing some refactoring and rewriting.  When I brought my complains to the mailinglist I was <a href="http://textdrive.com/pipermail/wp-hackers/2005-May/001114.html">told by Matt</a> that the code base was very mature because of their old roots in b2.</p>
<p>Having old roots might make the code seem mature, but for me mature code also has to be well documented, something which the WordPress code cannot claim to be.</p>
<p>I have not yet tried <a href="http://lightpress.org/">LightPress</a>, but maybe I will.  Since it runs on top of WordPress I imagine that switching will be easy.  Thanks for the tip.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sencer</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-260</link>
		<dc:creator>Sencer</dc:creator>
		<pubDate>Sun, 29 May 2005 10:13:17 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-260</guid>
		<description>&lt;p&gt;Hi Martin,&lt;/p&gt;

&lt;p&gt;I can understand very well what you are trying to say. Most of it results from the fact, that Wordpress grew out of b2, which had the same problems. But a few years back and with a lot smaller code base that was (a little) less of a problem. I don't think it's possible to change the minds of the many people that are comfortable with the code, because they have gotten used to it. Refactoring that mess is a major, major task.&lt;/p&gt;

&lt;p&gt;A rewrite would likely be faster (but of course has its' own problems). However that would probably not fair well with users, because it could break many plugins, one of the major advantages of WP wrt to other blogsoftware. (There is a lightpress project which basically tries to do just that, my first impressions have been quite positive). I am afraid this is a take it or leave situation, I left it (b2 that is) and went to Textpattern, which also has little to no documentation in the code, but has a lot less dependencies, less global variables, and generally more readable code (IMHO).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Martin,</p>
<p>I can understand very well what you are trying to say. Most of it results from the fact, that Wordpress grew out of b2, which had the same problems. But a few years back and with a lot smaller code base that was (a little) less of a problem. I don&#8217;t think it&#8217;s possible to change the minds of the many people that are comfortable with the code, because they have gotten used to it. Refactoring that mess is a major, major task.</p>
<p>A rewrite would likely be faster (but of course has its&#8217; own problems). However that would probably not fair well with users, because it could break many plugins, one of the major advantages of WP wrt to other blogsoftware. (There is a lightpress project which basically tries to do just that, my first impressions have been quite positive). I am afraid this is a take it or leave situation, I left it (b2 that is) and went to Textpattern, which also has little to no documentation in the code, but has a lot less dependencies, less global variables, and generally more readable code (IMHO).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asymptomatic  &#187; Blog Archive   &#187; In Defense&#8230;</title>
		<link>http://mgeisler.net/2005/05/wordpress-code-quality/#comment-253</link>
		<dc:creator>Asymptomatic  &#187; Blog Archive   &#187; In Defense&#8230;</dc:creator>
		<pubDate>Tue, 24 May 2005 01:19:30 +0000</pubDate>
		<guid isPermaLink="false">http://mgeisler.net/2005/05/22/wordpress-code-quality/#comment-253</guid>
		<description>&lt;p&gt;[...] g about something in general terms which you don&#8217;t seem to have specific knowledge.  Martin Geisler wrote an incendiary post about the WordPress codebase, and while I will adm [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] g about something in general terms which you don&#8217;t seem to have specific knowledge.  Martin Geisler wrote an incendiary post about the WordPress codebase, and while I will adm [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
