Recall & Review
beginner
What is the main file of a WordPress plugin called?
The main file is usually named after the plugin and contains the plugin header comment. It acts as the entry point for the plugin.
Click to reveal answer
beginner
Why do WordPress plugins have a folder with multiple files instead of just one file?
To organize code better, separate features, and keep assets like CSS, JavaScript, and images in their own folders for clarity and maintainability.
Click to reveal answer
intermediate
Name three common folders you might find inside a WordPress plugin folder.
Common folders include includes (for PHP code), assets (for CSS, JS, images), and languages (for translation files).
Click to reveal answer
beginner
What is the purpose of the 'readme.txt' file in a WordPress plugin folder?
It provides information about the plugin like description, installation steps, changelog, and author details. It helps users understand the plugin.
Click to reveal answer
beginner
How does the plugin header comment help WordPress recognize a plugin?
The header comment contains metadata like Plugin Name, Description, Version, and Author. WordPress reads this to list and activate the plugin.
Click to reveal answer
Which file must contain the plugin header comment for WordPress to recognize the plugin?
✗ Incorrect
The main plugin PHP file contains the header comment that WordPress uses to identify the plugin.
Where should you place CSS and JavaScript files in a plugin folder?
✗ Incorrect
Assets like CSS and JavaScript are best organized inside an assets folder.
What is the purpose of the 'languages' folder in a plugin?
✗ Incorrect
The languages folder holds translation files to support multiple languages.
Which file provides users with plugin description and installation instructions?
✗ Incorrect
The readme.txt file contains plugin details and instructions for users.
Why is it important to organize plugin files into folders?
✗ Incorrect
Organizing files helps keep the plugin easy to understand and maintain.
Describe the typical file and folder structure of a WordPress plugin and explain the purpose of each part.
Think about how you would organize a small project with code, styles, and instructions.
You got /5 concepts.
Explain how WordPress recognizes a plugin and what role the plugin header comment plays.
Imagine WordPress scanning files to find plugins by looking for special comments.
You got /4 concepts.