How to create a plugin in wordpress?

1. Create a folder in plugins folder .
Project Folder   >>wp-content >> plugins  >> New folder.

2. Name the folder in such a way that related to functionality of plugin.

Sample : To give average rating for post name the plugin as  : average-rating

3. Create a php file with same name as the created folder.

Sample : average-rating.php

4. In the created file add following fields on the top:

Plugin Name: Average Rating
Plugin URI:
Description: adding bonus dynamicaaly to products
Author: vinsha
Author URI:
Version: 0.6.3
Text Domain: bonus-point
License: GPL version 2 or later –

Plugin name should be the name that displayed on the dashboard.

Then you can see the folder in plugins section of dash board with name :  Average Rating