Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

Some key learnings from Pippins WordPress Plugin Development 101 series

Recently I have been going through Tutorial videos at Pippinsplugins.com. They are a must watch for anyone who is serious about doing something in WordPress like developing a plugin, theme, etc. You can become a member by visiting here.

I just want to mention some of my learnings after watching the first series in those tutorials: Plugin Development 101 Series.

  1. Never ever, hardcode a URL in your plugin. Use plugins_url() instead.
  2. Always prefix your function name with something relevant to your plugin.
  3. Make your code readable. Use appropriate spacing. Readable code solves 50% of your problem.

Some of our own mistakes we made at Tyche:

  1. Hardcoding URLs, leading to support issues where customers complained that the plugin wouldn’t work as they had their WordPress installed in a separate folder.
  2. Using same function names as found in code samples on sites like WordPress.org or Stackoverflow.com . This resulted in errors as that function name would also be used by some other plugin. Example: my_custom_checkout_field_update_order_meta
  3. Using same function names in Lite & Pro versions of a couple of our plugins.

We are happy that we’ve learnt our mistakes & corrected them.

I hope the above tips help you.

Browse more in: Uncategorized

Share It:

Subscribe
Notify of
0 Comments
Newest
Oldest
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x