My Restaurant Reviews — a WordPress plugin

Posted on Leave a comment
Screenshot of My Restaurant Reviews widget

This post is long delayed. It should have been an announcement but will now be a backstory.

Back in May (4 months ago!), I did a website redesign for SkewerSpot, our family business. SS is a cute little restaurant/cafe in Jalandhar, Punjab, with a wide selection of snacks and waffles. We specialize in waffles, all sorts, especially stick waffles. Earlier the SS website was a pure Bootstrappy static thing. The design had become outdated, and it was difficult to maintain. So I redid the entire thing in WordPress. It looks pretty neat now, go check it out!

At that time, I was faced with a very specific problem. We have our online presence on Zomato, Swiggy, Google Maps, Instagram and Facebook. We get reviews on all these five platforms. I wanted a way of showing reviews/ratings from these sources in a unified interface. To address this specific problem, I created a specific WordPress plugin. It’s called My Restaurant Reviews (or ‘Mr.R’).

I wanted to create this as a dirty, cowboy-style plugin for my own website. But I soon realized it’d be cool to have others also benefit from it, since a lot of new-gen restaurants are cropping up each day that perhaps face the same problem that I did. So off I went to the awesome WordPress Plugin Handbook, read it cover-to-cover, and got to work. Within a couple of weeks, I had the first working version. Writing code in PHP again was nostalgically pleasant experience. I learned so much about the internals of WordPress, my respect for the platform and its code quality increasing everyday.

Anyway, in early June I finished it, and submitted it for publishing on the great WordPress Plugins Directory. What a scary name, haha! Thankfully, it was accepted after a short review. I’ve heard that there’s a rigorous review process for all plugin and theme submissions, and some contributions are rejected daily for not following their coding standards. Didn’t happen to me 🙂

You can find and install it on your own WordPress website or blog from its official plugin page. Source code is on GitHub. There’s still so many improvements that can be done, especially in terms of adding support for more review platforms (currently only Zomato and Google Maps are supported). See TODO. With my arms spread, I invite ya’ll to help me take it to the next level.

My customizations are now a WordPress child theme

Posted on Leave a comment

This website uses a theme called Storefront. It’s a minimalistic yet elegant theme from Automattic (the creators of WordPress). I literally browsed hundreds of modern and ‘top’ themes at various sources before falling for this one. It was a good fit in its vanilla form and required only little customizations to suit my needs.

Yesterday I logged into my WP admin after a few days and saw several updates piled up. Storefront was one of them. I didn’t upgrade right away for I knew my customizations would be go away with its previous version. I had committed the cardinal sin of modifying the theme directly.

When I found out about the concept of child themes, I said to myself, “shit, I should have guessed already.” A child theme is one that contains files and assets you want changed in a ‘parent’ theme. So, rather than directly editing style.css or functions.php in a parent theme, one can create a child theme and add their modifications there. That’s what I did then. I created a child theme called Storefront AB, derived from the beautiful Storefront theme.

That was fun. It’s live now!

WordPress is a beautiful, sophisticated software, built to scale to millions of websites globally. A lack of something like the concept of child theme didn’t just feel right. I should have trusted my instincts earlier.

The WordPress Conundrum or How Medium Won the Blogging Race

Posted on Leave a comment

Featured image credit https://themegrill.com/blog/medium-vs-wordpress

So apparently Medium has redefined the blogging ecosystem. It’s like every fourth blog post I come across is on Medium. Have all serious bloggers moved away from WordPress to Medium?

Has WordPress–once bloggers’ paradise–not kept pace with the changing blogging landscape? Don’t get me wrong. I adore WordPress, which also powers this very website.

I think one of the key reasons for WP falling out of favor of serious bloggers lies in the way it is used today. Because of its huge plugins and themes ecosystem, people are using it as a general-purpose CMS rather than using it as a standalone blogging engine. Individuals, startups and enterprises are building beautiful websites on top of WordPress. In fact, in the last couple of years whenever I decided to change my blog’s theme I ended up being thrown at me (by Google search results) ‘top’ WP themes that were all startupy and enterprisey. Just what happened to the bloggy themes? Seems like theme designers no longer care about blog-focused themes; they create what people demand.

I have high hopes that the upcoming v5 of WordPress will be revolutionary and will bring back fun to blogging.

My little improvement to an already great WordPress to Twitter plugin

Posted on Leave a comment

I am blogging as much as I am tweeting these days. To keep the momentum going, I decided to link my blog with Twitter. I checked available plugins and instantly linked WP Twitter Auto Publish. It has a rating of 4.8 (with 130 ratings), which I think is great for a WordPress plugin. It’s both simple and sophisticated at the same time: pretty customizable, a lot of options. Posting of featured image along with post title/content has to be one of the best features.

I found one thing missing, though — the ability to automatically use post tags as tweet hashtags. Instead of writing to the developers, requesting them to add this feature and then waiting for a few days or weeks or months, I decided to hack plugin’s code myself. The result can be seen in my tweet generated by this post.

As the plugin is open-source, I have published my code changes to my GitHub. I have dropped a Slack message to the developer requesting him to merge.

https://github.com/anuragbhd/wp-twitter-auto-publish

P.S. WordPress plugin ecosystem is still based on SVN. Really?

DigitalOcean is fun, but is it worth it?

Posted on Leave a comment
Courtesy: https://www.cloudways.com/blog/host-wordpress-on-digitalocean/

It’s fun! No doubt about that. If you are a web developer or a cloud enthusiast like me, you will love DigitalOcean. I found it to be a true personification of creating cloud infrastructure that scales as you grow. Unlike the wild pricing jungles of Azure and AWS, DO has a pretty neat price sheet. Creating and deleting VMs is stupendously easy. They have done a great job with their community documentation, which has now evolved into a gold standard for everything servers.  And it’s reasonably cheap! Is there anything to NOT like with DO? Let’s see.

I have moved my blog (this website) from Arvixe (cheap shared hosting, batshit customer support) over to DO (fully managed VMs, apparently great customer support), including my domain. Through Let’s Encrypt, I now even have my very own SSL certificate (see that green https thing in browser’s address bar?). I have hardened my LAMP installation to my liking.

I had opted for the cheapest plan ($5/mo), where my VM’s performance is comparable to what we get in shared hosting. Frankly, $5/mo is not a big amount to pay in exchange for full control of the server and a great technical support.

With the help of their one-click apps, I am very much looking forward to deploying Ruby on Rails and Node.js applications some time in the future.

P.S. If you sign up at DigitalOcean using my referral link, you will get $10 to start with. Wish I knew about it while I was signing up 🙁