WordPress plugin sample

Following is the code of a sample WordPress plugin

<?php

/*
	Plugin Name	: My First WordPress Plugin
	Plugin URI	: http://phpscripts.in/my_first_wordpress_plugin
	Description	: A simple plugin for doemonstration
	Version		: 1.0
	Author		: Mukesh Dak
	Author URI	: http://mukeshdak.com
	License		: GPL
*/

function my_plugin1_menu()
{
	add_menu_page(
		'My Plugin1',
			// Page title
		'My Plugin1',
			// Menu title
		'administrator',
			// Capability ( below this it will not be shown )
		'my_plugin1',
			// menu_slug ( handle ), must of unique
		'create_my_plugin1_page'
			// This function will be executed when menu is accessed.
	);
}	

function create_my_plugin1_page()
	{
		echo "This is My Plugin1 page";
	}

/* create this menu in Admin */
add_action('admin_menu', 'my_plugin1_menu');

?>

This plugin will just create a menu which will generate a page.