Pippins Plugins
  • Email
  • Facebook
  • Feedburner
  • Github
  • Google
  • Twitter
  • Vimeo
  • Youtube
  • Rss
  • About
  • News
  • Join the Site
    • Member Benefits
    • Member Plugins
    • Email Notifications
  • Plugin Store
    • Affiliate Area
    • Checkout
  • Plugins
    • Plugin Portfolio
      • Plugin Portfolio – List View
    • Free
    • Premium
    • Member Plugins
    • Coding Standards
    • Get Plugin Support
  • Tutorials
    • Series
      • Plugin Development 101
      • Creating a User Follow System Plugin
      • Customizing Restrict Content Pro
      • Displaying Content with Easy Content Types
      • Writing Your First WordPress Plugins, Basic to Advanced
      • Working with Widgets
      • User Submitted Image Galleries
      • Plugin Thoughts
      • Integrating Stripe.com with WordPress
      • WordPress Rewrite API
    • Member Exclusive
      • Free Members
      • Subscriber Only
    • Difficulty
      • Beginner
      • Intermediate
      • Advanced
    • Action and Filter Hooks
    • Ajax
    • Custom Post Types
    • External APIs
    • Short Codes
    • Taxonomies
    • Video Tutorials
    • Widget Tutorials
    • WordPress Admin / Dashboard
    • Working with jQuery
    • WordPress Database
    • Writing Plugins
    • Tag Index
  • Reviews
  • Support Forum
  • Contact
    • Support the Site
    • Request Code Review
    • Plugin Support

Structuring Your First WordPress Plugin

Posted on September 23, 2011 by Pippin in Beginner, Free Members, Member Restricted, Tutorials, Writing Plugins 13 Comments
Home» Tutorials » Beginner » Structuring Your First WordPress Plugin
Tweet
Love It - 4
This entry is part 2 of 7 in the Writing Your First WordPress Plugins, Basic to Advanced Series
← How to Begin Writing Your First WordPress pluginWriting Your First WordPress Plugin Part 3 →
  • How to Begin Writing Your First WordPress plugin
  • Structuring Your First WordPress Plugin
  • Writing Your First WordPress Plugin Part 3
  • Writing Your First WordPress Plugin Part 4
  • Writing Your First WordPress Plugin Part 5
  • Writing Your First WordPress Plugin Part 6
  • Writing Your First WordPress Plugin Part 7 – Final

Knowing how to best structure your plugin is very, very important to the success and quality of your plugin. You should spend several minutes laying out the structure of your plugin before you ever begin writing it. This part of the Writing Your First WordPress Plugin series will walk you through the process of laying out your plugin structure. I will also describe many of the best practices you should be using while developing your plugin.

You must be logged in to view the rest of this content. Register or login from the sidebar.

Tweet Follow @pippinsplugins
plugin, plugins

13 comments on “Structuring Your First WordPress Plugin”

  1. nicksp says:
    September 24, 2011 at 8:49 pm

    Great start and good explanations of all the important things.
    Looking forward to the rest of series.

    Reply
  2. Scott says:
    October 18, 2011 at 5:00 am

    Thanks Pippin. I’m following along so far. I don’t really know php (very very little anyway) but appreciate this tutorial series. :)

    Reply
    • Pippin says:
      October 18, 2011 at 6:05 am

      @Scott – glad you like it so far. If you follow it through to the end, you should have a much better understanding of php (in some way or other). More coming soon :)

  3. Scott says:
    October 19, 2011 at 6:49 pm

    Cheers Pippin! Great tutorial series mate!

    I’m studying php now and I’m able to do simple functions/if-else statements when customizing my theme etc. but your plugin series is helping so much. I really do think knowing some php as well as WP Codex is going to help not only create plugins (eventually) but also with customizing themes, or creating them.

    Lots to learn and I’ll keep checking your site for more great info.

    Have a question about your tutorial on adding farbtastic to widgets but I think I’ll post/comment on that post.

    Thanks again for the work you do!

    Cheers

    Reply
    • Pippin says:
      October 19, 2011 at 11:35 pm

      Glad you like it and thanks for following!

  4. mohalam says:
    October 31, 2011 at 4:22 am

    I started following this series, It seems great! I will start making my first plugin soon.
    I have a question about making the files in folders and making comments. my question: isn’t this going to make the site load too much files and also make the files bigger in size when we fill them with comments. Don’t we have to think about the loading time of the site?

    Reply
    • Pippin says:
      October 31, 2011 at 11:20 am

      @mohalam – Technically, yes, adding extra folders and filling the files with comments will make the plugin larger, but the impact you will see will be so utterly minimal that you do not need to worry about it. The advantage you will see by structuring your plugins well and leaving extensive comments will greatly outweigh the increased size.

  5. mohalam says:
    October 31, 2011 at 5:59 pm

    I can see your point!

    Reply
  6. aeboi80 says:
    September 18, 2012 at 1:25 pm

    I’m really enjoying this series. I just found it and I have been wanting to jump into plugin development for sometime now. I’ve been coding themes for over the past year. This is a great way for me to learn the basics. Thanks again!!

    Reply
  7. Moaz Ateeq says:
    December 23, 2012 at 4:46 pm

    there is an error,”The requested URL /embed/GTvwql7KH3M was not found on this server.”

    Reply
    • Pippin says:
      December 26, 2012 at 10:51 am

      Where are you seeing that error?

  8. gary renauro says:
    January 5, 2013 at 4:18 pm

    Great Tutorial.

    THank You

    Gary

    Reply
  9. Fernando Herrera says:
    February 3, 2013 at 2:12 pm

    Thank you so much for this tutorial

    Reply

Leave a Reply Cancel reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Login

Lost your password?

Please enter your username or e-mail address. You will receive a new password via e-mail.

  • Facebook Become a Fan Like

  • Twitter Subscribe on Twitter Follow

  • YouTube Follow my Videos Subscribe

  • RSS Feed Subscribe with RSS Subscribe

Easy Digital Downloads

Most Loved

  • Love It Pro for WordPress
  • Write a “Love It” Plugin with Ajax to Let Users Love Their Favorite Posts / Pages
  • Simple Notices Pro Plugin for WordPress
  • User Bookmarks for WordPress
  • Front End Registration and Login Forms Plugin

Similar Plugins and Posts

  • How to Begin Writing Your First WordPress plugin
  • Customize Plugin Action Links
  • Create Database Tables When Plugin is Activated
  • Sugar FAQs – WordPress FAQs Management

Latest Premium Content

  • Plugin Development 101 – Introduction to Adding Dashboard Menus
  • Plugin Development 101 – Intro to Loading Scripts and Styles
  • User Follow System – Part 5
  • Plugin Development 101 – Intro to Short Codes
  • Plugin Development 101 – Registering a Custom Post Type
  • Plugin Development 101 – Intro to Actions

Latest Tutorials

  • Submitting Your First Pull Request to a WordPress Plugin on Github (1)

    Github is an extremely popular tool for managing WordPress plugins, and one...

  • Plugin Development 101 – Introduction to Adding Dashboard Menus (1)

    Adding new menus, both top level and sub level, to the WordPress Dashboard is a really common task for plugins...

  • Plugin Development 101 – Intro to Loading Scripts and Styles (16)

    In this part of Plugin...

Enter your email to receive automated updates when new posts are published

Latest Tweets

  • RT @mikejolley: If you were getting an ‘undefined’ error after login with Sidebar Login for WordPress, try 2.5.3 http://t.co/SVAiI831Bx
    May 19, 2013
  • @jasonbobich hmm, interestinf
    May 19, 2013
  • @jasonbobich I haven&#039;t recently
    May 19, 2013

Topics

featured Sugar Event Calendar contextual help get_user_meta meta box Tom McFarlin add_options_page attachments wp_enqueue_script register_setting shortcodes hook add_shortcode attachment mail chimp image plugin forms login short codes authors Related posts do_action bbpress comments recent posts post types apply_filters short code taxonomies custom post type images gallery Ajax Stripe taxonomy jquery users widgets add_filter easy content types add_action widget restrict content pro easy digital downloads

Weekly Newsletter

Useful Links

  • Join the Site
  • Plugin Store
  • Affiliate Area
  • Tag Index
  • Support the Site
  • Suggest a Tutorial
  • Random Post
  • Contact

Monthly Archives

(c) 2011 Pippin's Plugins