Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 64 of 428)

WordPress eCommerce, Past, and Future

Rewind a few years, and early e-commerce in WordPress was a bit of a hack (as it was in most blogging software).

There was a time when “WordPress is just for blogging” was a valid argument. Products were simply blog posts. Programmatic gymnastics took place to work around this, but in the end, everything was saved in the database as a post with attributes just like any other blog post.

Then, in WordPress 3.0, Custom Post Types came to be, and this opened a vast array of possibilities. Suddenly everything fit in the posts table. Anything you could think of, from social network content to e-commerce products, could all fit in the posts table, with the postmeta table to back it up.

A post could now be thought of as an entity or a model with attributes or properties described by information in the post metadata table.

But it’s not like that anymore.

Continue reading

WordPress Widgets: Refactoring, Part 2

After all of the preliminary content, we are finally at a place where we are ready to begin resolving the coding standard problems thrown by our IDE and by our code quality tools.

In doing this, I’m going to be breaking down the content into two posts:

  • the first post is going to focus solely on refactoring the existing code,
  • in the next post, we’re going to look at refactoring the structure of the plugin to enhance the organization and architecture.

Screen Capture on 2018-11-20 at 12-50-27.gif

For now, though, let’s take a look at the errors the code sniffer is throwing and see if we can’t bring it up to more modern standards.

Continue reading

Keeping Domains, Hosting, and Email Separate

Though this is something I think anyone with a domain, self-hosted site, and email should use, it’s also something I think is important for us – as those who provide services to others – should use.

Specifically, I’m talking about keeping domains, hosting, and email separate so if you opt to change, say, your hosting then you can keep all of the parts working with as little downtime as possible.

In this post, I’m going to cover how to do it, the services I recommend (and no, none of these are affiliate links), and then how each piece works independently of one another to provide the most seamless experience possible.

Continue reading

The Third Social Media Sabbatical of 2018

Back in February, I opted to take a social media sabbatical which is nothing more than a fancy way of saying “time off of social media.” This was a continuation of something I did last year, too.

Then, back in December, I took the month off of pretty much every social network of which I was a part and thoroughly enjoyed the time away. But it wasn’t because of anything such as removing myself from something bad.

Over the year, I’ve begun to question what I think about social media as a whole, but I think that time away from it serves me well (that is, me personally – I don’t pretend nor attempt to make this prescriptive for anyone else).

Anyway, with us heading into the final month of the year and with the success that I’ve had in months past, I thought it might be time for me to do this again to close out the year.

Social Media Sabbatical of 2018: Episode III

This time, though, I might remix it a little bit.

Continue reading

Quick Tip: Optimizing Loading Assets in WordPress

Whenever I think of assets in WordPress, I generally think of JavaScript files and stylesheets; however, I know that fonts and images can also count, too.

One of the things that are all too common, though, especially as it relates to the administrative area, is loading assets in WordPress on screens where they aren’t needed.

It’s completely possible to make an argument that given the file sizes or the functionality that each present, the files are only impacting a minimal amount of load time at best, right?

But match this mentality with who-knows-how-many plugins, and you’ve got more than a heavy impact happening on a given payload.

So what can we do?

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑