To create plugin in wordpress follow below steps
Create folder with your plugin name. Create php file with your plugin name. Now put blank index.php file for folder security.
Write down plugin name in your plugin file as below.
Plugin Name: Your plugin name
Description: Your demo plugin
Check your admin side and see plugin is listed on plugin page.
You need to avtivate the plugin.