9 minutes reading time (1866 words)

Meet an extension developer: Samuel Marshall JCH Optimize


Patrick Jackson talks with Samuel Marshall, creator of JCH Optimize, a Joomla optimization component that can significantly improve your Joomla website’s performance, on how he got started with Joomla, and where JCH Optimize is headed.

Next month is 18 months since Joomla 4 was officially released. In 2021 the magazine had the “Getting extensions ready for Joomla 4” series, talking with Joomla extension developers about their progress in updating their extensions for Joomla 4. In November Hans van der Meer followed up with a number of extension developers to see how it’s going.

For 2023 I’m restarting the series, but as Joomla 4 is now well established, I’ll be talking less about getting ready for Joomla 4, and more on the programmer’s journey to becoming a Joomla extension developer.

Meet Samuel Marshall

Samuel Marshall’s been developing JCH Optimize as an optimization extension for Joomla, and later Wordpress, over the past ten years. JCH stands simply for Javascript, CSS and HTML, and the component does what it says - optimises the output for your site. I’ve been using JCH Optimize now for several years, and have been constantly implementing it on sites to boost their Lighthouse and overall performance significantly. You can find some presentations from the Joomla Australia User Group youtube channel on some of the results the group has achieved.

So what’s your programming origin story?

I didn’t start off as a software developer. I actually did a degree in electrical and computer engineering. Back in Jamaica when I graduated I spent a few years working in building power distribution networks, but hated it. I liked computing and electronics, but while at university I chose “power distribution” as the more marketable major skill. I was wrong.

I decided to start my own business… tried to create a version of Netflix in Jamaica. I bought a source script to try and set that up with. It needed a few customisations, and so I asked the developers I got the script off to make the changes, and they said they’d come back with updates in a few days. In those few days I thought I’d fool around myself and try to customise it.

So I came up with a solution, and then waited for theirs to come through. When their solution arrived, I realised I preferred mine, so I implemented it instead. That then happened a few more times, and I worked out that I was creating better code than them as I completed the website. Unfortunately, the business turned out to be a total flop, but I realised that I really liked programming.

That’s quite a switch - so how did Joomla come into the picture, and the concept of an optimisation solution?

I got hooked on coding before leaving the power company job - I’d be working on pole lines during the day, then would be up until 4am coding. A website I developed at that time took ages to download which was embarrassing as I was showing it to the client, so that saw me start investigating how to make websites download faster.

And that was just the JCH - javascript, css and html - aspects of it - I hadn’t discovered Joomla at that point. I can’t quite remember how I found out about Joomla, but I know that when I did find it, I decided that I wanted to incorporate my JCH script into Joomla, so I started investigating how to make my own component. I found this plugin that was available at the time.

I can't remember the name of it. I was giving the developer some advice and suggestions on how to make it better. He responded but eventually he stopped responding - I guess I was doing it too much, and eventually I decided, you know what? I'll just teach myself again.

At that time it was Joomla 1.5, so I made my own plugin, called it JCH Optimize and put it up in the extension store. And that was it. 

So now I see you’re based in Toronto… that’s a bit colder than Jamaica?

Yes, it’s a bit different. I've been here now for five years with my wife and two sons. I've been operating JCH Optimize as a business now for the last nine years. When I left my power job, I was wondering what else I could do? I didn't like the idea of working again for someone. I looked back at JCH Optimize and I realised that, you know, it was getting some attention, it was getting a lot of good reviews. It was getting some downloads, and I decided that, hey, you know what? Maybe I should try to monetize it. So I developed a pro version with some additional features and, along with the free. Alright, since that's already on, on extension and built a website for it, put it up and it, it took off and it took off nicely!

Fast forwarding, JCH has come a long way from the original plugin, with your current version being a component for Joomla 4. Anything else your business is doing?

This is pretty much it. I started with JCH Optimize, and then I started to think about what other extensions I could compliment that with. Some other developers have a number of extensions. I’ve tried thinking of some others to look at, but I can only do something that I identify with and like, and I decided that JCH Optimize would be it.

It was, and then I decided that, well, you know what, rather than doing a number of extensions, why not just do this one extension on different platforms? And so I started with WordPress and I also have a version for Magento and Drupal. Yep. But those both are underdeveloped because there's a lot of things happening behind the scenes. I just didn't have the amount of time that I would've wanted to develop the business in the way that I wanted to do. 

Joomla is the main platform I support. I branch out into WordPress. I've never really managed to gain a foothold at the market in WordPress. By the time I got into WordPress, there were other similar plugins and they were already very popular like W3 Total Cache, WP Rocket and WP Super Cache.

Most of my subscribers are Joomla users - 90% - but I can’t tell you how many sites that translates to it being used on. 

In getting the extension ready for Joomla 4, did you find that there were a lot of things you had to do to get it ready?

JCH Optimize was really just a plugin for the first few versions as you would remember.

Then it started to get a little complicated and some people were asking for it to be changed to a component. I thought it was a good idea. There were some other features that they were asking for, like what I now call the Mode Switcher. Some people wanted that easy way to switch it off and switch it on, which made more sense of being a component.

So while making that change, I decided to, at the same time, make it compatible with Joomla 4. In putting it into a component, at that time, I had started using Akeeba FoF (Framework on Framework) which sort of eased that transition a bit because when using that, it automatically was compatible with both Joomla 3 and Joomla 4.

There's a core code framework, which sits behind an abstraction layer. But even in front of that, I still need to speak to Joomla. So when we just started then the abstraction layer would be speaking through FoF which in turn would speak to Joomla. Akeeba shortly after that, discontinued FoF almost immediately after I finished.

I wanted a good solution, so now instead of using FoF, I'm actually using the Joomla framework itself, not so much the CMS. Yep. But I'm using the Joomla framework because I needed something that was compatible with both Joomla 3 and Joomla 4. I didn't want to code  different plugins for each version. So I'm not actually so much hooked into the CMS, but I am using codes that I can also use for the most part in WordPress.

As time goes on I'll soon drop support for Joomla 3. Once Joomla ends support for version three, I'll also drop support for it. At that point, I'll be coding directly using the CMS API itself. 

Have you designed JCH Optimize’s latest improvements with performance tools like Google Lighthouse primarily in mind, or have you built the component over time? 

Over time it’s been GTMetrix and Google Pagespeed that have been driving performance measurements. When I started, GTMetrix was probably even the most popular one. But you know because Google is the one tied to the search, SEO performance is a large part of what we do, people tend to want to use page speed more. Then when they came out with Lighthouse it was a whole different ball game because we found that when sites were performing very well on GTMetrix, when you started using Lighthouse you weren't making any difference at all - it just highlighted some different problems as Lighthouse looked at a few more things.

So you look at the opportunities and, and say, okay, what can you do to automate this or what you need to do to address the particular opportunities that they are highlighting. You just continue adding features to address the different issues.

To finish up, what are some tips you have for those using JCH Optimize?

Yes - first of all, when you're optimising, you only need one tool. You don't get better results from doing it twice. So if you're optimising like Javascript, CSS and HTML, just use one tool for that. 

If you’re going to use JCH Optimize, disable all your JS, CSS and HTML optimizations in the templates. If you're using Cloudflare, even disabled its compression and caching features too.

I recommend using our page cache plugin and only use one page cache plugin because if you use more than one, they tend to conflict with each other. If you’re using the JCH Optimize Page Cache Plugin, don’t use the Joomla core one as then you start getting conflicts.

What else is in the pipeline?

I'm going to be doing some more development on image optimization in upcoming versions. 

Currently if you upload webp images, they’re not able to be seen by the component to be further optimised or reset, so that’s coming soon.

We’re also looking at a resize tool. That will let you create folders with dimensions in the folder name. The component will then create resized versions of the images automatically based on the folder name or the name of the image. So you might have 1200x1200, 600x600 and 300x300 as folder names, and the component will then create 3 different sized versions of the image in the cache to output as required.

I look forward to seeing those features soon. Thanks for your time Samuel.

You can find JCH Optimize on the Joomla Extension Directory

Holopin and Joomla, a partnership worth celebratin...
Joomla, may we have your votes please?

Comments 1

Already Registered? Login Here
Patrick on Wednesday, 25 January 2023 14:50
I have a Lifetime Subscription to JCH Optimize

JCH Optimize is the Swiss Knife of Joomla Optimization. It’s include in all my websites.
Thanks Samuel, Thanks Patrick.

JCH Optimize is the Swiss Knife of Joomla Optimization. It’s include in all my websites. Thanks Samuel, Thanks Patrick.

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/