Don't just skim this section thinking it's a waste of breath on the self-explanatory header fields. Unlike a normal PHP file in which the comments are purely optional, in WordPress plugin and theme files, the Information Header is required! It is this block of text that causes a file to show up on WordPress' radar so that you can activate it or deactivate it. If your plugin is missing a valid information header, you cannot use it!
Exercise—breaking the header
To reinforce that the information header is an integral part of a plugin, try the following exercise:
In your WordPress Dashboard, ensure that the "Hello Dolly" plugin has been activated.
If applicable, use your preferred (s)FTP program to connect to your WordPress installation.
Using your text editor, temporarily delete the information header from wp-content/plugins/hello.php and save the file (you can save the header elsewhere for now). Save the file.
Refresh the Plugins page in your browser.
You should get a warning from WordPress stating that the plugin does not have a valid header:
After you've seen the tragic consequences, put the header information back into the hello.php file.
This should make it abundantly clear to you that the information header is absolutely vital for every WordPress plugin. If your plugin has multiple files, the header should be inside the primary file—in this book we use index.php as our primary file, but many plugins use a file named after the plugin name as their primary file.
Location, name, and format
The header itself is similar in form and function to other content management systems, such as Drupal's module.info files or Joomla's XML module configurations—it offers a way to store additional information about a plugin in a standardized format. The values can be extended, but the most common header values are listed below:
Author: Listed below the plugin name
Author URI: Together with "Author", this creates a link to the author's site
Description: Main block of text describing the plugin
Plugin Name: The displayed name of the plugin
Plugin URI: Destination of the "Visit plugin site" link