WordPress header parser error

I had this weird problem when I uploaded my WordPress plugin RSS from aljazeera to the WordPress plugin directory. After installing the plugin it makes a notice that the plugin needs to be updated to version 0.0! and clicking update doesn’t seem to have any effect.

At the first glance I thought it is a problem in the readme.txt file in the SVN repository. WordPress provide a repository for plugins hosted on the WordPress plugin directory, but I checked it and every thing was right. Then I checked the plugin PHP files and every thing seemed OK. After hours of experimenting and googling I finally found the problem.

This was the header of the PHP file in the plugin:


/*
 * Plugin Name: RSS from Aljazeera
 * Plugin URI : https://wordpress.org/plugins/aljazeera-rss/
 * Description: Display the latest Arabic RSS feed from aljazeera.net news website
 * Version    : 1.2
 * Author     : Ahmed Essam
 * Author URI : http://www.ahmedspace.com
 * License    : GPL2
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

My mistake was adding padding spaces to align all the “:” to be on the same column. The WordPress parser only accepts header values where the “:” is adjacent to the name. But you can put spaces after the “:”. I changed the header to be:


/*
 * Plugin Name: RSS from Aljazeera
 * Plugin URI:  https://wordpress.org/plugins/aljazeera-rss/
 * Description: Display the latest Arabic RSS feed from aljazeera.net news website
 * Version:     1.2
 * Author:      Ahmed Essam
 * Author URI:  http://www.ahmedspace.com
 * License:     GPL2
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 */

Then every thing worked as it should.
Apparently you have to keep this format for every headers parsed by WordPress including theme headers.
Happy coding!