SKELETON FRAMEWORK FOR A WORDPRESS PLUGIN

 

<?PHP

/*
Plugin Name: Menu Test
Plugin URI: http://codex.wordpress.org/Adding_Administration_Menus
Description: Menu Test
Author: Codex authors
Author URI: http://example.com
*/

// You can do all the menu creation at once.
function boj_menuexample_create_menu() {

add_menu_page( 'My Plugin Settings Page', 'Menu Example Settings','manage_options', __FILE__, 'boj_menuexample_settings_page', plugins_url( '/images/wp-icon.png', __FILE__ ) );

add_submenu_page( __FILE__, 'About My Plugin', 'About', 'manage_options', __FILE__ . '_about', 'boj_menuexample_about_page' );

add_submenu_page( __FILE__,'Uninstall My Plugin', 'uninstall', 'manage_options', __FILE__ . '_uninstall', 'boj_menuexample_uninstall_page' );

}
add_action( 'admin_menu', 'boj_menuexample_create_menu' );

// Then you actually have to declare the functions that will generate the pages/page content.
function boj_menuexample_settings_page() {

echo "<h1>Settings Page</h1>";

}
function boj_menuexample_about_page() {

echo "<h1>About Page</h1>";

}
function boj_menuexample_uninstall_page() {

echo "<h1>Uninstall Page</h1>";

}

?>

LINK

how to write a wordpress plugin