The Story Behind My Organization Schema Widget

Today’s article might be boring to some, but it’s something every WordPress plugin & theme developer might want to spend the time to read. Today, I want to discuss the inspiration behind the source code of my recently released Organization Schema Widget available at the WordPress Plugin Directory.

The Idea

The idea for how to build the plugin came from Kevin Spence, the man behind KidVolt. When he and I discussed how best to implement schema into the footer and sidebar of WordPress installations, Kevin suggested I build a widget plugin to handle the task. Kevin recently created the Simple Google News plugin for WordPress and it was his first time coding a widget. When he said how surprisingly easy it was to build a widget I thought his idea was sound and decided that what he suggested would be the way in which I build my plugin.

The Research

Knowing that I was going to create a widget for the schema plugin I first downloaded Kevin’s Simple Google News plugin to study his source code. In particular I wanted to see how he built the widget portion of the code.

Next was to begin a series of searches on Google to see what turned up for people adding organization schema to websites. Not just WordPress, but any website. I wanted to see what people were saying, how they’re implementing their solutions and see if anyone was sharing what they have learned.

The final part of my research involved searching the WordPress plugin directory. I wanted to see what was already built and if a solution existed that we from a plugin author that I could stand behind and recommend with confidence. I already recommend plugins such as Gravity Forms, Relevanssi, The Events Calendar, WordPress SEO by Yoast and a handful more. So finding an existing schema plugin that would meet our needs would be the best solution.

Requirements & What I Found

The following plugins were identified as potential existing solutions:

Requirement #1:

The plugin cannot state that using it will increase your rankings. The word rankings should not be used. Search performance is acceptable, but not the word rankings.

If a plugin developer made the claim that their plugin would impact your rankings, they were eliminated. So who got eliminated?

  • All In One Schema.org Rich Snippets – More than once they state that using their plugin would improve your rankings. Boost CTR. Improve SEO & Rankings AND Helps you rank higher in search results.
  • Add Meta TagsGood metadata facilitates this process and thus plays a significant role in achieving better rankings.
  • Local Business SEO - This small simple plugin will immediately boost your seo ranking. They even put in bold text “boost your SEO ranking” which I’m sorry people, it’s simply bullsh!t.
  • WP Social SEO Booster - Turn on Your Blog’s Social SEO with WP Social SEO Booster and get a Huge Boost in Google Rankings! Another false claim.

Numerous websites have published articles on the topic of schema.org and how it may or may not impact your rankings and your overall search performance. Too often I came across someone incorrectly stating that using HTML5 microdata markup from Schema.org will make your website rank higher in the SERPs. Boost seems to be the most popular expression…

Google’s reply to the question: Will using schema.org improve my site’s performance in search?

Google doesn’t use markup for ranking purposes at this time—but rich snippets can make your web pages appear more prominently in search results, so you may see an increase in traffic.

Take note that the question dealt with “site’s performance” yet they answered with the phrase “ranking purposes” to help clarify that you will not currently see a “boost” in rankings, but you may see some other type of performance enhancement.

Requirement #2:

If I’m going to recommend a plugin that performs something as simple as displaying microdata markup it must be error free. I was surprised to find that two plugins in the list were tossing errors. A tip for plugin developers: Please turn on DEBUG mode when developing plugins.

Which plugins contain errors?

Local Business SEO

Upon installation of Local Business SEO I’m greeted with a plethora of Php Notices. Sure, these aren’t Errors or Warnings, but seeing this many Notices indicates to me that the author of the plugin doesn’t pay attention to the details.

Error #1:

local business seo - error 1

Error #2:

local business seo error #2

Local Business Microdata Widget

Upon activating the Local Business Microdata Widget I’m not greeted with any errors, so that’s good. However, when I use the widget I’m greeted with a Notice informing me of an undefined variable.

Local Business Microdata Widget

Requirement #3:

It must meet my current needs for styling and functionality.

  • Ability to select Organization type.
  • Ability to separate Mon-Fri, Sat and Sun hours.
  • Ability to show data to users and when appropriate only show data to the crawlers.
  • Ability to style the data using an included stylesheet. Plus have the ability to disable the included stylesheet so that users can use their existing stylesheet to style the data and increase their website’s performance.
  • Ability to show phone number or fax number selectively independent of one another.

Sadly, at this point only Schema Creator by Raven is left in the mix, but it’s not made for widgets. It’s to be used at the page/post level.

So What’s Next?

Back when I was enrolled at ECPI, my programming instructor once asked me a question:

How many COBOL programs are there? His answer was… 1.

He went on to explain that once someone created the first “hello world” program in COBOL, the next person came along and grabbed that code and tweaked it to fit their particular needs. The next person came along and did the same thing and so it continues to grow from the one single program.

Thanks to the WordPress licensing model and GPL we’re given great freedom as developers in that we have the right to share and change free software — to make sure the software is free for all its users. That is what I have done with the Organization Schema Widget. I took the best part of the source code from others and combined it into my plugin.

But Why Build Upon an Existing Plugin?

Many people might ask why I would take the existing plugin Local Business Microdata Widget and re-purpose it and offer it up to the WordPress community in the plugin directory. Short answer: Because I can. The long answer…

Remember reading the requirements of my plugin needs above? Well, the Local Business Microdata Widget came closest to meeting my needs but ultimately it fell short. So off I went to tweak it for my specific needs. What makes the Organization Schema Widget different from Local Business Microdata Widget?

  • The ability to select more than just the LocalBusiness type of an organization. Note: As of version 0.3.0 the other plugin allows even more options than my plugin.
  • The ability to hide the ‘store hours’ if an organization type of LocalBusiness was not selected.
  • Place all content within span tags and not p tags.
  • Based upon online chatter from people I respect in the WordPress plugin community such as Pippin Williamson, Justin Tadlock and Tom McFarlin I wanted to create the ability for users to disable the included stylesheet.
  • Refer to requirement #3 above and add a few more minor things that I have specific needs for.

In the process of building this plugin I learned how to create an options page which soon will contain more than simply turning off the stylesheet. I also learned how to handle the deactivation of the plugin and the deletion of the plugin. I’m a believer that when a user DELETES your plugin that you should clean house and remove every footprint that your plugin left. I’ve seen too many plugins not clean up after themselves and it bothers me, so my plugin cleans up after itself.

In Closing

Many discussions, some heated have been had in the past regarding WordPress and GPL. You can either embrace it or not.

If someone wants to come along and grab my plugin, they have the right. Go grab the source code here and make it better.

If you’re a web developer and need to display company contact information into a widget area I hope you use my Organization Schema Widget plugin and provide feedback so that I can make it better. Trust me, it’s not perfect and as software it can always be improved upon.

Peace!

Share Your Comments: