QoolArchives. An Archives WordPress plugin

We would like to inform you about the QoolArchives WordPress plugin!!
This plugin tries to solve a big WordPress problem that has to do with CPU load and speed.

The problem
When you have a wordpress site with 200-400 articles, WordPress is just fine but when it comes to a site that has more than 1500-2000 posts, then WordPress is a real CPU load monster! The problem is because WordPress asks the total number of posts from the database every time we make a request, making the DB to run a full scan of the post’s table. This can really kill your server!!!

The cause
Wordpress uses FOUND_ROWS. What this does is, that it asks the database for the total number of rows found on a query with no need for a second sql query to count the rows. As mentioned above, this is fine for a wordpress installation with 200-400 posts but it sucks when you have to do with thousands of posts.

The QoolArchives sollution
The plugin creates archived posts and moves the posts from the post’s table to another one. Thus making the post’s table smaller and easier for the FOUND_ROWS function to deal with.

Side effects
The plugin has some side-effects though.

Widgets problem
The calendar and the archives widgets will display records only for posts that have not been archived yet. So if the latest archive has been created at 28-03-2011 the calendar will display records only for days after 28-03-2011 . This is not such a big problem cause you can actually see the posts by going to a previous day :


You can download the plugin here: QoolArchives WP plugin

Any demos?
The QoolArchives plugin has been installed here: Writer.gr

Read More

Damn Small PHP Frameworks. Because size does matter.

First of all let me clarify, that if you are looking for a Symfony, CodeIgniter, CakePHP.. etc article, this is not what you are looking for. In this article you will find small and extra lightweight PHP frameworks that in some cases, can make your life easier. Really.

Why use a framework?

Because re-inventing the wheel again and again is something a productive (note the word used: productive* ) developer, should not do. By using a framework that supports the MVC patern (Model,View,Controler), you can keep your code readable and understandable, you seperate application logic from presentation and many more things that would require more than an article to cover.


We start our listing with the Kohana framework. The Kohana team describes the framework as a PHP5 framework with support to the MVC architectural pattern that aims to be secure, lightweight and easy to use. The full package sized only 1.5MB (629KB compressed) has everything you need to create great and fully functional php applications. Some of the modules included are:

  • Archive – Compressed archive creation, supports zip, tar, gzip, and bzip.
  • Auth – Simple authentication and user management. Uses ORM for models.
  • Gmaps – Google Maps integration, geolocation, and API support.
  • Kodoc – Dynamic self-generated documentation. (Beta!)
  • Payment – Provides merchant and payment gateway wrappers. Supports Authorize.net, PayPal, Trident, Trust Commerce, and YourPay.

Great documentation (Wiki based, this means that everyone can contribute. Something like the PHP Manual, where user comments are the real documentation) , excellent and small tutorials like : Creating a blog with Kohana Part 1 and Part 2, make learning the kohana framework a lot easier.


Rapyd is another small php framework that can also be used as a library. 250KB of compressed files with an uncomressed size of 484KB. It is definetely impressive what you can do with it. Some of it’s features:

  • No compiling, no command line needed, just unzip, it will work.
  • PHP5 Strict
  • Modules support
  • Nice URLs (SEO oriented)
  • Tiny MVC in few files


epicode is an extremely lightweight PHP framework. It includes caching, session, database, form validation, twitter, oauth and asynchronous/non-blocking curl components. EpiCode started off as an MVC framework but has evolved into a set of extremely useful tools. Every tool is completely decoupled so they can be used independently or in conjunction. Each library in EpiCode is thought out and implemented in an extremely cohesive manner. The documentation can be found here.

Extra Light Framework

ELF PHP is a php framework with a very small footprint, built on Model-View-Controller architecture. Believe it or not, PHP ELF is sized only 39KB compressed and when extracted it’s size is only 72KB. Although it’s small size it features:

  • Caching system
  • URL Routing system
  • Logging system
  • Requests handler
  • Image manipulation class
  • Database abstractization
  • Minimal server load

and the plans for the Beta 3 include adding:

  • Validation class
  • Session class
  • Pagination class
  • File upload
  • Common scripts
  • Improved caching engine
  • Improved models


BaseApp Framework is aimed at individual commercial developers or small web application builders who need a starting point.Also if you are a CakePHP User you will find yourself at home with the API. BaseApp was inspired by CakePHP And Codeigniter but tries to do everything under 50 kb.
It has support for most common features available in frameworks these days but achieves all this in under 50 Kb of compressed Code and not MBs of it. Some technical data:

  • PHP 5 with support for new features like autoloading etc.
  • Fully MVC ( But can be used as a library also ).
  • CakePHP API ( 80 % ) and Layout.
  • Active Records and Object Relation Ship Mapping (ORM).
  • Model Validation with complementing form helpers.
  • Data Abstraction Layer with Adodb Support ( Almost all databases supported ).
  • Extensive Debugging and Exception Handling facilities ( FireBug Support Built in ).
  • Extendable Cookie and Session Handling.
  • Search engine friendly and url routing features.
  • Ajax Support through Jquery.

The project is hosted on Google code.

Read More