{"id":105115,"date":"2014-07-08T08:17:08","date_gmt":"2014-07-08T12:17:08","guid":{"rendered":"http:\/\/2014.nyc.wordcamp.org\/?post_type=wcb_session&#038;p=105115"},"modified":"2014-07-15T14:38:02","modified_gmt":"2014-07-15T18:38:02","slug":"best-practices-for-plugin-development","status":"publish","type":"wcb_session","link":"https:\/\/nyc.wordcamp.org\/2014\/session\/best-practices-for-plugin-development\/","title":{"rendered":"Best Practices for Plugin Development"},"content":{"rendered":"<p>So: you know how WordPress hooks work. You can write a plugin. But can you write a good plugin?<\/p>\n<p>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&#8217;ll introduce:<\/p>\n<ul>\n<li>Compatibility: the importance of name spacing and why you should always enqueue common assets and scripts<\/li>\n<li>Security: basic principals and applied practices of data sanitization and validation<\/li>\n<li>Maintainability: ensuring your plugin cleans up after itself, and plugin upgrade routines<\/li>\n<li>Reliability: high level guidelines for working with cache-able APIs, and common mistakes that don&#8217;t scale, such as:\n<ul>\n<li>Using cURL instead of taking advantage of WP_Remote APIs<\/li>\n<li>Using SQL instead of taking advantage of query objects (WP_Query, WP_User_Query, etc)<\/li>\n<li>Not caching when you absolutely must execute heavy operations<\/li>\n<\/ul>\n<\/li>\n<li>Usability: some quick pointers for embracing the WordPress philosophy of simplicity and &#8220;decisions, not options&#8221;<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;ll introduce: Compatibility: the importance of name spacing and &hellip; <a href=\"https:\/\/nyc.wordcamp.org\/2014\/session\/best-practices-for-plugin-development\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Best Practices for Plugin Development<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1973938,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1407002400,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[105042],"footnotes":""},"session_track":[325309],"session_category":[],"class_list":["post-105115","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-manhattan"],"jetpack_shortlink":"https:\/\/wp.me\/p4tOrc-rlp","jetpack_sharing_enabled":true,"session_date_time":{"date":"August 2, 2014","time":"2:00 pm"},"session_speakers":[{"id":"105042","slug":"jake-goldman","name":"Jake Goldman","link":"https:\/\/nyc.wordcamp.org\/2014\/speaker\/jake-goldman\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/105115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":3,"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/105115\/revisions"}],"predecessor-version":[{"id":105538,"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/105115\/revisions\/105538"}],"speakers":[{"embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/speakers\/105042"}],"author":[{"embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wporg\/v1\/users\/jakemgold"}],"wp:attachment":[{"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/media?parent=105115"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/session_track?post=105115"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/nyc.wordcamp.org\/2014\/wp-json\/wp\/v2\/session_category?post=105115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}