6 Important Points To Consider Before Re-Publishing Code

There’s many blogs about WordPress which re-publish code taken from other sites.

Even though PHP is open source and WordPress themes are licensed GPL does that mean you can re-publish someone else’s code?

How about licensing, responsibly managing code, updating code, code quality & understanding the code?

Here’s 5 important points you may want to consider before publishing someone else’s code on your site or someone else’s.

1Code Quality

Having answered over 10,000 questions on 3 of the leading forums about WordPress, i can accurately write that a large percentage of code used to answer questions on these forums is regarded by the experts as low quality.

Many of the leading contributors on these forums have also stated this.

The fact is, coding takes a long time to learn and you need extensive knowledge of WordPress in order to understand which functions, hooks, filters and tags to use otherwise you could break someone else’s installation.

Alot of the code re-published on forums and different sites has simply been copied and pasted without being tested and may never be updated.

2Will You Update The Code

The code in WordPress and many themes changes at times.

Are you prepared to follow the WordPress lead Developers and make sure the code you have re-published is kept up to date?

Many of the people directly involved in the ongoing Development of WordPress like Andrew Nacin, Mark Jaquith & Konstantin Koveshenin publish content about best coding practices. They suggest the best ways to write code including which functions, action hooks, filters and tags to use in your code.

You need to be prepared to follow these people on a regular basis in order to make sure the code you distribute always works and is updated when needed.

Here’s 3 examples of what i’m talking about.

template_redirect is NOT for loading templates.

WordPress Lead Developer Andrew Nacin on don’t use query_posts.

Automatics Konstantin Kovshenin writes about Don’t do_shortcode

Above are 3 examples of hundreds which you really need to understand in order to support the code you are responsible for publishing on your site or elsewhere otherwise it can cause serious performance issues, damage to the database and even break someone else’s site.

3Will You Support The Code

When you embed other people’s code on your site, are you prepared to support it?

When your readers want to use the code on their own sites, will you be able to answer questions about how the code works and what it does exactly.

I’ve seen some sites publish large amounts of exactly the same code examples as what are published on the WordPress Codex.

Do these people truly understand how the code works?

Have they provided other examples which they have tested or modified themselves based on the original code?

4Do You Fully Understand The Code

When you publish code anywhere, someone will want to use it.

Do you understand the code enough to be able to modify it when your readers need this to be done?

Why didn’t you simply write it yourself?

Why would you publish someone else’s code if you fully understand it yourself?

If you’ve written the code yourself, you should have tested it and would understand the code enough to modify it when needed.

5Copyright

Unfortunately, just because PHP code is open source doesn’t mean you can take code from anyone’s site and do whatever you want with it.

  1. Sure you can use it on your any number of your own sites.
  2. You can use the code on client sites and charge them to install the code.
  3. You can use the code in your free themes and distribute the themes.
  4. You can use the code in your premium themes and sell them to make money.
  5. You can take the code from any premium or free theme which is GPL licensed and publish it on your site or someone else’s.

However, re-publishing any type of content from someone else’s site may be in breach of that sites copyright policy and could get you in trouble.

Check first by reading the sites copyright policy or contact the owner of the site directly for approval.

Are you re-publishing the code because you don’t want to link to it on someone else’s site?

A websites Copyright, GPL and Open Source are NOT the same.

6Duplicate Content

Google can and does take away a domains search traffic if it includes duplicate content. They are very harsh on sites re-publishing existing content and not producing original content.

There have been many sites effected by Algorithm updates and many of the site owners still don’t understand why they have lost a large percentage of search traffic.

Google has clearly stated many times that unique content produced by the author is what they want to index, not content published from someone else’s site.

If you don’t write and test the code yourself, you generally won’t have nearly as much of an understanding how it works and therefore are not really an expert author on the topic.

Suggestions

  • Many forums don’t allow you to update your replies or answers once they have been posted.
  • Once you re-publish code on someone else’s site, in most cases, you will never be able to update it.
  • If you do re-publish someone else’s code, use a Github Gist to display WordPress code as this enables you to update or remove the code if you don’t plan on supporting it.
  • Even if you test the code and know it works, there’s still at least 19 reasons the code won’t work even though it does when you test it.

How About You?

What are your thoughts about re-publishing other peoples code?

What are your feelings towards people who re-publish your code?


Comments

5 responses to “6 Important Points To Consider Before Re-Publishing Code”

  1. […] 5 Important Points To Consider Before Re-Publishing Code […]

  2. Jeff Guynn Avatar

    Brad:

    Thanks for your insightful post. I always learn a bunch from you, and frequently about things that I “didn’t know that I didn’t knowt”. You answer questions I didn’t even know I had, and this time around you lit a fire under my backside to raise my game with code quality.

    You mentioned the following about yourself: “Having answered over 10,000 questions on 3 of the leading forums about WordPress…” Could you disclose here what you consider to be the 3 leading WP forums? I assume one is my.studiopress.com, but the other two?

    Thanks again, Jeff.

    1. Brad Dalton Avatar
      Brad Dalton

      WordPress.org, WordPress Answers & StudioPress theme forums are 3 of the best which i have been involved with for some time as a contributor.

  3. Herb Trevathan Avatar
    Herb Trevathan

    I think people should link back to the source. I have started either going back to the post and thanking the person nice enough to solve my problem in advance for me or going on twitter and thanking there whichever is easiest for me at the time before I forget.

    One of the things I like about using Genesis is the community and all of the people who help. I really appreciate this website also since over time this has become a trusted source for me to find code because I know you stuff works when I use it.

    It is also very transparent an unauthentic when someone tries to look smart, cool or whatever by posting code they did not write or know much about. Over time they show their level of knowledge.

    I also see people posting snippets on new websites a lot presumable in hopes of gaining piecemeal work but I have not seen that work out for people.

    Not just because I am on this website commenting, but I really like how you write what was asked and then answer the question. What a great way to never run out of ideas : )

    Either way we all know copying feels wrong, and we are taught from childhood not to. Maybe feeling anonymous online and the need for validation, acceptance or 15 minutes of code fame get the best of people…who really knows? Not me that’s for sure…

    I like your mention of going back and updating the information. I also like reading Sure Fire Web Design’s website and how he has at the top of each old post “this was last updated…if you see an error please let me know…”

    I thought that was great when I saw it the first time, and also thought that it was clear way to let readers know what is going on and invite needed correction if it was noticed.

    1. Brad Dalton Avatar
      Brad Dalton

      Great comment Herb.

      Always look forward to your feedback and insight.

      Cheers

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.