WP Plugin Needs Love: WordPress Code Snippet

Five years ago I created a monster and that monster’s name was “WordPress Code Snippet” (notice the improper spelling of WordPress).  I was indeed a very naive plugin developer when I created it.  Looking at the code today since my last revision four years ago makes me cringe and make me feel bad for the 7800+ that have downloaded it.

There are so many things wrong with it that I wish I had done differently:

  • Use custom post types instead of a custom database table. (This would be good for backups and multisite installations.)
  • Use WordPress’ built-in CSS and JavaScript libraries.
  • Use shortcodes instead of pasting in comment tags that get filtered.
  • Not run a database setup every time the object is instantiated. (Doh!)
  • Enqueue CSS and JS correctly.
  • Add a TinyMCE button to insert shortcode.
  • Use WordPress’ AJAX functionality instead of doing my own thing.
  • Better documentation.
  • Spell WordPress correctly…

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *