1.Plugin Directory Structure:

Your Plugin:
● /wp-content/plugins/my-plugin
Inside “my-plugin”
● screenshot-1.png
● my-plugin.php
Always put it in a directory!
Uses 'dashes' and not 'underscores' having four parts

● Plugin Header
● Hooks
● PHP Code
● Template Code

3. Plugin header example, always on top withyour own detail

	Plugin Name: Health Check
	Plugin URI:
	Description: Checks the health of your WordPress install
	Author: The Health Check Team
	Version: 0.1-alpha
	Author URI:
	Text Domain: health-check
	Domain Path: /lang

4. Activate and deactivate function

register_activation_hook(__FILE__, 'do_active');
register_deactivation_hook(__FILE__, 'do_deactive');

function do_active(){
//do something

function do_deactive(){
//do something

5. Actions and Filters (2 Kinds of WordPress Hooks)

<?php add_filter( $tag, $function_to_add, $priority, $accepted_args ); ?>

<?php add_action( $tag, $function_to_add, $priority, $accepted_args ); ?>

● Action and Filter Reference