Software Engineering in WordPress, PHP, and Backend Development

Author: Tom (Page 59 of 427)

Successful WordPress Freelancing By Andy Adams

For those of you who have been reading this blog for some time (and by some time, I mean years), then you’ve likely heard me mention Andy Adams.

I’ve talked about him in the previous posts:

Though we don’t work professionally together anymore, we’ve kept in touch, and I’m incredibly proud to share that he’s just released a book: Successful WordPress Freelancing.

Continue reading

What Are Source Maps (And Are They Needed)?

If you work on the front-end of a site in any capacity – be it for a plugin, a theme, or even something outside of WordPress – you’re likely working with minification tools.

The benefits are obvious, right?

  • it lessens the payload,
  • it allows us to focus on development on our local environments

But one of the features that come with working with these technologies and that’s the ability to generate source maps.

And this raises a question (or maybe two): What are source maps? And are they even needed?

You can claim it’s late to the game to talk about this, but there are always people entering the industry that may not know this material.

So why not cover it?

Continue reading

WordPress Widgets: Refactoring, Part 6

You should be well-versed in the refactoring we’re doing regarding the WordPress Widget Boilerplate. If not, I recommend catching up on the series thus far by:

As far as the code base goes, we’re in a good place right now. We’ve begun to refactor much of the code into smaller, more focused classes. And we’ve just set up a Registry so that we can begin working with instances of objects throughout the plugin without the need for too much coupling.

But there’s still a problem we’re facing and it deals with namespaces and autoloading. I’ve talked a bit about this a couple of years ago but not as it relates to Composer.

And that’s what we’re going to look at in this post.

Continue reading

Writing Loops in PHP: Two Ways; Same Thing

When you’re working with a collection in PHP, most notably, arrays in PHP, there are two ways in which you primarily see the information manipulated:

  1. through for loops,
  2. through a variety of the array functions that PHP provides.

For what it’s worth, I think the array functions provide greater readability but they have been shown to be slower (especially with larger data – with smaller data, it’s naturally going to be negligible).

I often work with for loops and related functions to achieve the same thing but I thought it might be worth look at an example from the previous post and how I used the array functions to achieve the same things as a for loop.

Ultimately, this is is a comparison post but I think it’s good to see how the same code can be written in different ways.

Continue reading

« Older posts Newer posts »

© 2025 Tom McFarlin

Theme by Anders NorenUp ↑