So: you know how WordPress hooks work. You can write a plugin. But can you write a good plugin?
This session assumes a basic understanding of plugin development (hooks!) and PHP, and introduces habits that make plugins secure, reliable, compatible, maintainable, and usable. In 30 minutes, we’ll introduce:
- Compatibility: the importance of name spacing and why you should always enqueue common assets and scripts
- Security: basic principals and applied practices of data sanitization and validation
- Maintainability: ensuring your plugin cleans up after itself, and plugin upgrade routines
- Reliability: high level guidelines for working with cache-able APIs, and common mistakes that don’t scale, such as:
- Using cURL instead of taking advantage of WP_Remote APIs
- Using SQL instead of taking advantage of query objects (WP_Query, WP_User_Query, etc)
- Not caching when you absolutely must execute heavy operations
- Usability: some quick pointers for embracing the WordPress philosophy of simplicity and “decisions, not options”