How to enable Meta Box free extensions when Meta Box is embedded in a WordPress plugin or theme

The situation is this, we’ve embedded Meta Box (core) into our plugin Clay Framework (which powers this site, goldhat.ca). Everything works fine, and we added the Meta Box AIO (collection of all premium Meta Box extensions). Now so far AIO was just activated as a plugin, not embedded into Clay Framework. And all the premium extensions seem to work fine, though there are so many we haven’t had a chance to test them all yet! Where we ran into a bit of a snag was when we installed Meta Box Custom Post Types. This post types extension is not bundled into Meta Box AIO because it’s free (only premium Meta Box extensions are found in Meta Box AIO). And when we activated it, a notice appeared that said “Meta Box needs to be installed”.

Digging into the code we saw that Meta Box Custom Post Types plugin uses the “init” action to check if Meta Box is installed. The priority on that check is 0, which doesn’t leave a lot of room to integrate Meta Box before it’s called. We were able to solve that using -1 as the priority in our init hook call where we integrate Meta Box. I wasn’t sure if that would work because I didn’t know if “minus values” are supported as hook priorities, but apparently they are! Is it good practice though, could it cause some complications? I’m not sure, leave a comment if you know the answer to that.

For now we’ll continue setting -1 as our init priority to integrate Meta Box, and that solved the problem for the Meta Box Custom Post Types plugin. It now loads properly and seems to be functioning normally.

WooCommerce developer mods compilation

Removing the annoying “Showing the single result” message when the catalog has only 1 product.

This example does the job, but bear in mind that the ‘woocommerce_result_count’ action won’t show at all even if the count increases later.


Change the add to cart button text.


How to remove the “default sorting” dropdown from WooCommerce

 

7 reasons why hiring offshore based developers is a bad idea

Over the 15-years I’ve spent as a PHP programmer I’ve seen the rise of offshore development, the fall in average cost of development, and more recently the resurgence of on-shore development as customers realize they’re sacrificing business opportunity when they hire the cheapest developer they can find. Today Upwork, the largest freelancer site is dominated by Indian, as well as Pakistan based developers. There is no doubt that this region serves a definite need in the marketplace. Just look at some of the jobs posted at Upwork. Build me a WooCommerce website with a custom theme for $200 reads one. Build me a massive social network like Facebook for $120 reads another. One wonders what happens on these projects? Does the budget increase? Does the project fail? I can only gauge from what I see, which is the work provided by new customers whose previous developers were from India. Based on that experience of being “the guy that takes over” the site/plugin, here are 7 reasons why hiring Indian based developers is a bad idea.

  1. Many offshore developers fail to respect even the most basic development principles. The most common example is the “hacking” or editing of base themes and plugins. Nearly every site we take over from an Indian based developer has edits to plugins. The result is those plugins cannot be updated. This is a problem worthy of it’s own blog post. If you’re unsure if your site already has these kind of edits, ask your developer about it. While in some cases editing a plugin might be necessary, it should be a last resort. WordPress has a hook system, and is a modular framework that is designed to enable custom functionality and new features without editing existing plugins and themes. On the theme layer, a child theme should always be used rather than editing the base theme for instance.
  2. Errors are ignored and not fixed. Often sites built in India have hidden errors, or functionality bugs that have not been detected. Thorough testing reveals these errors, as does turning error reporting on. Because error reporting is usually turned off for live websites, as a site owner you might never see these errors. While they don’t break your site (warnings) it is possible data isn’t being stored correctly, notices are not being sent to customers, form submissions are not being processed, and a host of other actions are not happening. At the very least these errors indicate a lack of quality in the work, and symptomatic of larger problems hiding under the surface.
  3. Are you really saving money? An all too common story of the website development project sent offshore to an Indian developer is that part-way through the project the scope changes, more money is demanded, and the final cost is much higher than expected. In fairness scope management is a factor for developers everywhere in the world, but Indian developers have a reputation for holding their customers hostage refusing to deliver work or finish projects if their demands for more money are not met. This cuts into the savings you might perceive from the initial quote. A much costlier problem is that if you eventually realize you’re not getting good work from an Indian developer, you might bring your development projects back onshore. But is the foundation of your WordPress website solid? We’ve seen sites built in India that require major fixes before any new work can be performed, and the costs of this repair eliminate or deeply cut into any savings.
  4. Schedules are often missed by Indian-based developers. Having hired over 30 India based freelance developers myself before I stopped trying to work with developers from India, at least half of them stopped a project partway due to a festival. Now to be clear these were 30 different developers working on different projects at different times of the year over a decade. Yet, midway through the projects, it was suddenly festival time. Either India has a lot of national holidays, some that last for weeks, or developers use these kind of excuses to buy them time before they are fired when their unable to meet a deadline.
  5. Lack of commitment to project completion is one of the scariest factors in hiring offshore developers. In the west we are used to professionals feeling a sense of obligation to finish what they start, and unless there is a significant reason such as missed payments or serious disagreement over the terms, we expect once we’ve hired a freelancer that they will finish the job barring something catastrophic happening. Perhaps it’s a cultural difference, or just a side effect of trying to work on a massive volume of projects, but many offshore-based developers have been known to end a project over trivial disputes, or simply say “this project is too difficult we cannot finish”. In those situations there is often an unapologetic attitude, the offshore developer simply says the project is over, often refuses to refund any pre-payment, and will argue that even something as basic as sending over partially completed work is not something they need to do. When things go bad in India for example, they go really bad, and there is little recourse in these situations. Don’t be under the false impression that a freelancer website such as Upwork is going to resolve these issues, though they do provide some protection for buyers it’s often not enough to offset the damage done when a project fails.
  6. There are affordable developers in some parts of the world with vastly superior track records. Many buyers today feel they have to offshore somewhere, they simply cannot put together a budget high enough to hire an American or European developer. And the availability, and willingness to work on certain projects is also a concern with on-shore developers. So where can you offshore more safely than India? Personally I’ve had the most success with Ukrainian developers, and other Eastern European locations such as Serbia. The work ethic and attitude of developers there is much more similar to Western Europe and North America. The communication level is also better, with many Eastern European’s able to both write and speak fluently. You will certainly pay more for developers from these regions, but there is still substantial cost-savings compared to on-shore development.
  7. Offshore developers are rarely able to provide consultation and make development choices, which becomes a big burden on project managers and site owners. A typical situation early in a project is the Indian developers asks what to do. You might (should!) have a written project plan, requirements document, perhaps visual designs. You provide these to the developer and offer to clarify them. More often than not they will come back to you and say okay I got your docs, now can you tell me what to do? Whether it’s a communication issue, or lack of experience, Indian developers are famous for not being able to identify the tasks required to turn requirements into deliverables. If you want something done, you literally have to ask for each step. This leads to micro-management. It’s also dangerous for project scope, because now you’re essentially looking over the developer’s shoulder and telling them which steps to take on a one-by-one basis. If things go wrong and the requirements are not met, the developer can simply say “well I did what you told me to do, sorry it didn’t work out”. That’s why you should always try to ascertain that a developer is results-focused, that they can convert requirements to working solutions, and they can do this without hand-holding.

I know I might take some flak from those who would say this is generalizing about a large number of developers from a specific region who vary tremendously. There is no doubt that there are many talented developers in India and other major offshore regions. But is it 1%, or 5%, or 10%? Who knows, but I can say that in dozens of attempts, I rarely found an Indian based developer that would be considered equal in merit to the average hire from the Ukraine, as an example. And in cases where an Indian based developer is a proven professional, most of them are not available for freelance work as they either have high paying jobs, their own firms, or work on a select number of big projects. Like any other market, top developers in India earn double or triple that of their counterparts, so don’t expect the truly qualified to be bidding on what is effectively a $3/hour job.

Let me close with a tip when hiring WordPress plugin developers from any part of the world. Always ask to see a plugin they built, they should be able to share at least 1 that is publicly available either hosted at WordPress.org in the plugins directory or for sale on a site such as CodeCanyon. Verify they actually have plugin experience, rather than just being site builders. Going back to Indian based developers, I’ve rarely seen a WordPress plugin that was built in India. They do certainly exist, but rarely do they rank in the top options in any of the plugin categories. And of all the Indian based developers that routinely respond to our job posts, out of around 200 we asked to send us proof of plugin development experience, the number that were able to do that was 0.

Developer for MainWP

We’re always excited to discover new WordPress plugins that we can work with. It’s one of the benefits of providing services across a wide range of industries and to clients with a variety of website from elearning to ecommerce. Recently we were hired to work on a MainWP project. If you’re not familiar with it already, MainWP is a dashboard for managing multiple websites within the WP admin. It provides many of the same features found in SAAS (software as a service) dashboards available for WordPress. The advantage over those external system is MainWP is a WordPress plugin, and it runs in your own website. That means you own it! And yes, it’s free. Both the MainWP Dashboard plugin, and the MainWP Child Plugin (which is installed on all the child sites) are available for free in the WordPress directory. There are also numerous MainWP extensions, some are free, and others premium.

MainWP can clearly save time and help create a more systematic approach to content development and distribution across a network of websites. It also simplifies management of sites and updates, saving development time and cost. Are you sold yet? We were immediately sold on the idea of using MainWP, and added it here to GoldHat.ca.

The project we worked on with MainWP involved a custom integration of the MainWP Spinner plugin. The client had hired a previous developer to build a custom approach to creating posts that would be published across their network of over 200 websites. MainWP Spinner extension integrates with online article spinner services such as The Best Spinner, Chimp Rewriter and many more. It is however limited in the content it can spin, only posts and pages. In this case the client had a customization where there was a custom post type, and fields were setup for images, headlines and various body text sections. After the article was “spun” all these fields would be aggregated together as post content, and published using the MainWP bulkpost feature. At this point the 1 article would be published to 5 sites, 10 sites or more and would be sufficiently unique on each site to qualify as unique content.

The problem with the implementation our client faced was a typical case of offshore development gone wrong. The previous developer “hacked” MainWP (the core plugin), hacked MainWP Spinner extension, and put only about 10% of the functionality into the actual custom plugin he built! Best practices be damned I imagine the developer saying! Well the result is the client updated MainWP, and voila the custom functionality broke. Fortunately it did not down his website, which is not uncommon in these cases. Reversing the damage done by the previous developer was a painstaking process of moving code from MainWP and MainWP Spinner into the custom plugin which we named MainWP Spinner Upload.

If you’re a site owner contemplating hopping on Upwork and hiring an offshore developer for customizations or plugin development just remember that it is very common to have this situation where work has to be redone later by a qualified WordPress developer. Mistakes made can be very costly in terms of downtime, cost to debug errors, and finally the obvious cost of having to eventually rebuild the features that you’ve had added. This is not to suggest that all Upwork developers are problematic, we still sell on Upwork to this day! There are also offshore developers, particularly in places such as Russia, Eastern Europe who do quality work. However the most common “help me my website is broken” situation we find is from “Built in India” or “Built in Pakistan” websites. While there are probably many great developers in these countries, unfortunately there are thousands of developers and firms that violate the most basic principles of WordPress development such as don’t edit the plugins (extend them) and don’t edit base themes (use child themes). Edits to plugins and base themes render your site unable to receive updates and because the entire ecosystem of WordPress is constantly evolving, it’s only a matter of time until something breaks, or a security flaw opens up that hackers can exploit.

Now that we have experience with MainWP and MainWP Spinner, we’re looking at opportunities to build custom MainWP extensions. We already have one new project with MainWP underway, it’s an integration with MainWP Spinner called MainWP Spintax Templates. It solves the problem that sometimes when spinning content you may want to embed a link, video or other content that is very lengthy when pasted into a text editor. Also organizing that content is time consuming. With our MainWP Spintax Templates plugin content managers can setup these spintax templates that then generate a shortcode. The shortcode is then copied into the editor and processed when the content is published.

We welcome our readers to comment on their experiences with MainWP and other topics in this blog post. Thanks for reading!

Epic WP Guide to Custom Post Type Permissions with Map Meta Caps

Setting up custom capabilities (permissions settings) for custom post types. It’s a topic that has frustrated many developers from novice all the way to expert. It’s the type of technical topic that tends to require more than a surface level understanding. Following a tutorial often isn’t enough to grasp it in a way that allows you to fully unleash the power and flexibility of the WP capabilities system. The good news is this Epic WP Guide from GoldHat Group is going to give you an in-depth exploration of how to use custom capabilities with CPT’s, how to use the map_meta_caps filter, and what to expect from the WP admin when you take various approaches to capability mapping.

Because this probably isn’t your first stop in making sense of how to use capabilities for CPT’s let’s start with an overview of the process before we begin to delve into the details. This epic guide is only going to involve 3 steps. That’s the good news. The bad news is there is enough complexity that we’ll be looping over these 3 steps a total of 3 times each in order to help your brain assimilate the information.

  1. How to use the capabilities settings (“capability_type”, “capabilities”, “map_meta_cap”) when registering CPT’s.
  2. Using the map_meta_cap filter to map primitive capabilities to meta capabilities.
  3. How to assign capabilities to roles and/or users.

CPT Capabilities Settings

When you setup your CPT there are 3 settings we care about that will affect how capabilities are mapped. These are “capability_type”, “capabilities”, “map_meta_cap”.

A common mistake is using capability_type and capabilities. This appears to cause conflicts, however we don’t have an authorized statement from any official docs saying don’t use them together. It’s just been our experience that using either setting alone works as intended, whereas using “capability_type” AND “capabilities” appears to cause either a problem with mapping capabilities which we handle later with the map_meta_cap OR it simple interferes with how permissions are applied. Whatever the case we advise using one or the other, not both. The “map_meta_cap” defaults to false, it should be set to true only when using “capabilities”.

To summarize you have 2 major configuration options using the 3 capabilities settings:

  1. Use capability_type (which defaults to string “post”). We call this a “semi-custom” approach, because WP will automatically create custom capabilities and map them for you. You won’t control the naming, that’s done by convention, and you won’t have control over the exact mapping that part will be done in a standard way. However before disregarding this approach, consider that you will still have extensive options to impose logic and affect permission utilizing the map_meta_cap filter. Ask yourself do I need more, and if so why? The more you understand how custom mapping of capabilities works, the more appropriately you’ll be able to make this decision. With this approach you DO NOT pass the “capabilities” or “map_meta_cap”. If you have a situation where these are being automatically set – you would need to pass an empty array for capabilities and false for map_meta_cap. These are both the defaults.
  2. Use custom capability mapping. This is the “fully-custom” approach, gives the maximum control. It allows you to pass an array of your custom capabilities, and to map them to the post capabilities which we’ll discuss in detail later. Using this approach allows you to control naming and to map multiple default capabilities to a single custom capability that you define. When using this approach DO NOT pass “capability_type”. You must set the “map_meta_cap” to true for this to work, and you’ll need to use the map_meta_cap filter.

Using Capabilities Settings in CPT’s

This is not a beginners guide to WP permissions so if you’re entirely new to capabilities and never used functions like user_can() we recommend brushing up on those basics. What we will cover here is how capabilities are mapped in relation to custom post types.

There are 2 types of capabilities: meta and primitive. Imagine meta capabilities as being major highways, routes or freeways. Let’s say you’re in a big city and you have 3 of these major highways, the one is called highway 5 another route 9, and finally we have route 17. If you want to head east, everybody knows, take the 9. You could be going to vastly different places, but you start with this major roadway. Same idea with capabilities. Always start by thinking about the meta capabilities, which will lead you to the primitives. You’ll see a lot of texts explaining these things in reverse, talking in terms of mapping primitives to meta capabilities. And it’s true, as you’ll see later when we work with the map_meta_caps filter that yes we do end up spending more time focused on the primitives. But that’s just like when driving someplace, you spend most of your time navigating the exits and smaller turns to find a place. You’ll never get even close if you don’t the right highway!

There are only 3 meta capabilities. Memorize them: edit, delete, read. For posts the actual name of them always ends with “post” so we have the list shown below:

  • edit_post
  • delete_post
  • read_post

Meta capabilities are not mapped to roles, whereas primitive capabilities are. The relationships here between the role, the primitive capability and the meta capability can be understood as follows:

  • Imagine you have a jug of water and a cup. As owner of the jug and the cup you can do whatever you want with either one, including pour the water in the cup, pick up the cup, drink from the cup and finally smash the cup on the ground.
  • Your child, can also pick up the cup and drink but cannot fill the cup or smash the cup!
  • Your dog isn’t allowed anywhere near the cup! He has full permissions only for the dish.
  • Our roles are owner/child/dog. The PRIMITIVE capabilities are pickup_cup, drink, fill_cup, smash_cup. The META capabilities are use_cup, destroy_cup.
  • When any of our users in this scenario try to pickup the cup, the question is asked “can they use the cup”? The question at this point is in the context of the meta capability, use_cup. We don’t directly get the answer, instead use_cup will reference which primitive capability(s) are required. The logic involved will take into account the user specific context, such as whether the user is the owner of the cup, or whether the cup has already been smashed!

To see the full list of capabilities available to map for a custom post type it’s worth reading the section at https://codex.wordpress.org/Function_Reference/register_post_type under the heading capability_type and capabilities. As mentioned earlier using the capability_type setting enables a “semi-custom” approach to mapping capabilities. As shown in the docs example, if the custom post type was “book”, setting capability_type to “book” would result in the capabilities shown below:

Now let’s look at an example of the fully custom capability mapping that is more commonly used when building plugins. When we want full control, and perhaps a different naming convention. This is form our QuizMaster plugin, notice that we prefix all our capabilities with “quizmaster_” which keeps them consistent with the naming conventions used in other areas of the plugin.

You’ll notice our custom definition of capabilities includes primitive capabilities such as “edit_published_posts” that are not automatically mapped when using the capability_type automatic mapping. This is because WP core generally does not use these in the WP admin. These other capabilities however can be very useful in providing more fine-grained control later when we define permissions logic in the map_meta_caps filter.

Mapping Capabilities with the Map_Meta_Caps Filter

The most common place where developers go wrong is in failing to utilize the map_meta_caps filter when they’ve set map_meta_cap to true in their CPT definition. If you’ve set map_meta_cap to true, you must use the map_meta_caps filter because generally speaking, all access will be denied until you return capabilities from this filter. You might think not using the filter would open permissions up, but quite the opposite in what may be a safeguard, no filter return means no permissions granted. That’s not to suggest that the purpose of map_meta_caps filter is to determine if permission is granted. It’s job is much more limited. It merely answers the question given the current context including the meta capability, the post, the user, what primitive capability would the user need to do what their trying to do?

 

http://wordpress.stackexchange.com/questions/155644/whats-the-difference-between-role-and-meta-capabilities-when-to-use-map-meta-c/215389

 

WP Pro Quiz Addons

WP Pro Quiz continues to be largely unsupported by the original developer, who’s name is not known and whose voice has not been heard in support tickets for the past few months. Issues continue to pile up, largely unanswered on both the WP plugin directory support section and the official GitHub repo for WP Pro Quiz at https://github.com/xeno010/Wp-Pro-Quiz.

Who is the mysterious “xeno010” that created WP Pro Quiz? We may never find out, as we have reached out to this developer at least 7-times including via their website and never received a reply. As I’ve written about before, it could be mainly a language barrier, the developer has explained in several replies on tickets that he’s not comfortable writing in English.

Well despite the lack of original developer support we continue to be contacted by site owners that are using WP Pro Quiz and want customizations or new features. Some of these then become ideas for a new addon. It is unfortunate that much-needed hooks cannot be added directly into WP Pro Quiz which would really help us extend it. Still we find ways to make extensions usually by extending the base MVC classes of WP Pro Quiz. This worked with some effort in the creation of WP Pro Quiz Completed.

A possible new addon for WP Pro Quiz was just discussed today with a start-up company from Italy. They have interest in creating a directory of quizzes, organized by category. A great feature, and one not well-supported currently by WP Pro Quiz. The shortcode creation is basically the only way of listing quizzes now, and that is not a dynamic solution.

Another commonly requested addon is one that will produce a certificate of completion that can be printed after a user has passed a quiz, or set of quizzes.

QuizMaster Plugin Project

The first time we worked with WP Pro Quiz was when DatGenius, a dental training website, approached us about a project. They wanted to show the completed quiz results students were taking on their WP Pro Quiz site. This feature which sounds like a given in any quiz system, was not available or even easily supported by WP Pro Quiz. This was the start of what today is an addon plugin for WP Pro Quiz, called WP Pro Quiz Completed.

It was during the “Completed” addon project that I first started thinking about forking the WP Pro Quiz project. There were a number of reasons. I’d seen this style of development before. Conventions ignored, unusual features, limited documentation. It’s impossible to write about this without being critical of the original developer of WP Pro Quiz. So I’ll preface this by saying it’s a major accomplish to build something as sophisticated as a quiz system, and to attract over 20,000 active users, according to the last WP directory stats. Now let’s it real and talk about some of the reasons for forking WP Pro Quiz versus contributing to it and aiming to enhance it as an open source project:

  1. Lack of responsiveness from developer. Every project needs a leader, and if the leader is absent it’s hard to move it forward even with pushes from people who offer help. When pushed code, and suggestions get largely ignored, that’s a big problem. There are countless complaints about WP Pro Quiz support being slow, and when responses do come they are not always as helpful as people would like. Providing support, and leading development, is a tough ask of any development team, let alone a lone developer, but the case is that a user base of 20,000 is going to have questions. Especially if…
  2. The documentation is limited or non-existent. Most aspects of WP Quiz are not documented, if we rated it like translation on a basis of completion we might say it’s currently 2% documented. Consider how this compounds the support issues, because if you have good docs you can minimize support by referring users to docs and save time leading to faster responses.
  3. Extending WP Pro Quiz is moderately difficult. Giving credit where it’s due the MVC approach in WP Pro Quiz makes it’s objects reasonably extendable. Yet for such a significant plugin, it only has about 3 actions and 5 filters, none documented. And more pressing is the widespread use of Javascript in places where PHP or a mix of PHP callbacks from AJAX calls would have made the system easier to extend. Combined with the lack of docs, trying to build an extension to WP Pro Quiz is a “you’re on your own pal” kind of experience. And it doesn’t need to be that way, the plugin is a solid foundation of functionality and with focus on making it extendable it could be possible to develop great hooks throughout.
  4. Language issues. Again we have to give credit to the translation work that makes WP Pro Quiz very accessible. But from an English-version perspective, and a developers perspective, the plugin is littered with English-errors, and very inconsistent use of titles. Helper text is oddly worded and often instructions for options don’t mean what you might initially expect based on the way it’s written.

I could carry on raising other smaller factors but I think you get the point. The distance between where WP Pro Quiz is, and what we would call a good place for a popular plugin is significant. After the release of WP Pro Quiz Completed as an addon, I reached out to the developer of WP Pro Quiz twice asking about opportunities to cooperate in building an addon system, and joint-marketing. There was no response.

Our path forward now with development is a dual-track approach. We’ll be continuing to build addon’s for WP Pro Quiz Completed and offering those in our store alongside WP Pro Quiz Completed. At the same time we’ve created QuizMaster, initially a fork of WP Pro Quiz. As we develop this it will remain fully open source, and after we add value to it we’ll aim to have it included in the WP Directory. Until that time it’s hosted on GitHub at https://github.com/goldhat/QuizMaster.

  • As QuizMaster is developed we’ll be creating a QuizMaster Pro version. This will be an enhanced feature version of QuizMaster with support for some of the features often requested now from the WP Pro Quiz project.
  • We recognize that quiz systems are used in a variety of ways, and the base plugin itself cannot (and should not) try to serve all. Instead it should be extendable so that developers can easily add custom plugins that tie into hooks the quiz plugin provides. QuizMaster will be highly extendable, with great docs and tutorials. We view it as a platform for quiz management.

Where can we improve QuizMaster and add value compared to the WP Pro Quiz plugin?

Before we add any functionality to QuizMaster we’ll be starting with a revamp of the foundation of the plugin and aiming to bring docs up to a good standard.

  1. Document existing features.
  2. Add hooks and filters to existing codebase.
  3. Improve the UX in key areas such as “Add Quiz” form, adding tabs/accordion or other approach to organizing options and making the page less cluttered and daunting to users.
  4. Fix existing codebase issues reported on WP Pro Quiz issues pages.
  5. Look into data storage and see if there is a way to optimize it, or reduce use of custom tables.
  6. Develop a migration path, preferably an automated migrate from WP Pro Quiz to QuizMaster.

Do you want to contribute to this initiative as a developer, or run a WP Pro Quiz powered site and want to share your input? Your comments below are welcomed! Thanks for reading about QuizMaster.

Managing WordPress Plugins hosted in the WordPress.org Plugin Directory

At the start of 2016 I recall saying to one of my partners “I can’t believe we’ve never been able to make a finished plugin and release it to the WordPress community”. Of course there were reasons… certainly not a lack of ideas, or even ability to code. Just a lack of time, and focus. Well that’s all changed, today GoldHat Group has 3 plugins in the WP directory, and plans to add more. All of our plugins so far are based on ACF (Advanced Custom Fields) a plugin that I consider essential to install on any site I build. To me “fielding” to borrow the Drupal term for it, is one of the most beneficial aspects of using a CMS. If there wasn’t posts types and fields and taxonomies, I’d probably not use a CMS and go the PHP framework route.

WordPress.org SVN for hosted plugins

Normally we only use GIT, so one of the first challenges of managing WordPress.org hosted plugins is that upon approval you get an SVN repo. Rather than really learning SVN, I installed SVNTortoise (https://tortoisesvn.net) and highly recommend that to lessen the learning curve.

Managing WordPress.org hosted plugin assets

See the handbook at https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/#plugin-icons.

There are a couple of places where information is stored about how to control various parts of the actual WordPress.org plugin directory listing. And I was months into it having Googled at least a dozen topics, before I discovered this “Plugin Author Handbook” which clarifies a few important parts.


This post is a WIP, apologies to all who have stumbled upon it!

 

WP Pro Quiz Completed Plugin

We have just finished version 1.0 of a new plugin named WP Pro Quiz Completed. This is an addon for the WP Pro Quiz plugin that is quite popular as a stand-alone quizzing system.

WP Pro Quiz Completed provides users with a list of their completed quizzes, and the ability to review all of the answers. Surely that must be part of the core plugin you say? Well it isn’t, normally students can only review quizzes immediately after they take the quiz. Admins can see statistics in the WP admin, so that information is stored. We have just taken the available statistics and made them available as a shortcode so they can be added to any page.

Visit https://goldhat.ca/product/wp-pro-quiz-completed/ to purchase and download the plugin which is available for $25.

Plugin docs are available at https://goldhat.ca/wp-pro-quiz-completed-docs/

SlimStat Banned Due to Security Flaw

A major security flaw in the SlimStat WordPress Plugin seems to have led to it being removed entirely from the WP plugin directory as well as being banned from various platforms including WPEngine.com.

I’m disappointed to see SlimStat banned because it was not long ago that I discovered the popular analytics system for WordPress. And while Google Analytics had always been my first choice, I liked the relative simplicity of SlimStat. Hopefully they will be able to fix the security flaw and then be able to get the plugin back into the directory. In case that’s already happened by the time you read this post here is the (currently broken) link to the plugin at it’s former location SlimStat WP Plugin.

The SlimStat website is still up and running and I could not find any details about why the plugin hasn’t simply been fixed and then restored to the WP plugin directory rather than outright removed. The download link from the SlimStat site does link to the previous location in the WP plugin directory so it’s clearly not a case of the plugin deciding to do it’s downloads directly on it’s own site. Which would never make sense for a free plugin anyway.

I do remember when trying to make some custom features work using SlimStat that functions availabele to work with were quite rough, very difficult. Definitely not a modern style of coding in the plugin I felt from what I saw of the code as I dug around trying to make custom queries on the SlimStat data. Of course I can’t judge the plugin as a whole but it didn’t surprise me based on the code I saw that it might have a serious vulnerability given the type of plugin.

According to a report about this issue on PCWorld over 1 million sites could be affected by the SlimStat security issue. However that same article also mentions upgrading to a newer version as fixing the issue. This suggests SlimStat did release a working version that resolved the security flaw. Am I missing something? Unfortunately when I search for SlimStat aside from these security flaw reports I don’t see a lot of “news” but just mostly advertising and comparisons and technical information about using and integration the SlimStat plugin. Is there really a deliberate removal of SlimStat, or is SlimStat banned from the WP plugin directory? Cannot say for sure but I know one thing I cannot get the plugin from the WP Admin plugin interface or from the plugin author site or the official WP plugin directory. That makes the project seem dead to me.

It seems like for now it’s back to using Google Analytics. However aside from GA to me seeming very complex in it’s interface and functionality, it has a number of potential accuracy issues first details in this article (perhaps biased article!) from GA alternative CrazyEgg. It seems to make some good points, that if you want truly consistent accurate reporting there are a lot of situations to consider and you could be losing visitors from a wide range of circumstances. The one that I took notice of was the suggestion that up to 30% of Google Analytics tracking might be lost due to deletion or refusal of cookies. And though I’m normally marketing to North America, I’m aware of the law now in the EU that requires a cookie notice and for cookies to be accepted by users from EU-based sites. How does this play into the situation with Google Analytics tracking? All questions I’ll be looking into and would appreciate comments about.

There are alternatives but most of these come at a price or have limited free usage. One that caught my eye is MixPanel which is similar in concept to KissMetrics. Unlike KissMetrics which is very pricy even at low levels of traffic the MixPanel is free up until a certain level. And comparison testing and reviews seem to suggest most prefer it over KissMetrics and others are only slightly leaning toward Kiss as the better tool. What is interesting is MixPanel gets straight to the useful data, the actual analysis or decision-making data unlike Google Analytics which still focuses on views and bounces and their main quantification of what visits are all about. MixPanel promises us the ability to measure every event on our site, and that’s a prospect that is exciting to me. With GA I know there is an API for event tracking, but if a developer like me finds it daunting then how many websites are actually implementing custom events tracking on things like video plays and subscription form views and other events?

This post originally about SlimStat has morphed for me into a research session and reporting about Google Analytics and alternatives. To wrap it up, SlimStat at least for now seems to be a dead project despite it’s once significant install count of 1 million plus. The search is still on for alternatives other than Google Analytics. And the question remains what is the best approach both to collecting but also analyzing and acting on user data? One thing is for sure in 2015 and beyond the marketer best able to make sense of data and best able to make data-driven decisions will be most capable of creating friendly and efficient user experiences.