In this article I'll discuss why inefficient coding of your website could lead to problems with the level of your account's resource usage.

What is inefficient code?

One of the best ways to think of computer code is as a set of instructions, or even a recipe, to get to the expected end result again and again. That's why computers are great at repetive tasks, because they can be given instructions to do a certain task, and then they will follow those steps exactly over and over again.

The set of instructions the computer is going to follow is provided by a human, and typically for web hosting, it will be in a scripting language such as PHP. There are many ways to end up at the same result when coding, and just because you end up with the correct result, doesn't mean it was the most efficient way of getting there.

For instance with most dynamic CMS (Content Managment Systems) like WordPress, they are going to have a database back-end where information is stored. Then each time a visitor comes to the site, the PHP scripts interact with the database to retreive that information. In this case WordPress builds up a HTML page to hand off to a web-browser each time one is requested.

Now if don't get very much traffic at all, or you're on a VPS (Virtual Private Server) or dedicated server, the default way that WordPress or another CMS like it operates might be efficient enough. However if you're on shared hosting, and you get a decent amount of traffic, continually regenerating the same HTML page again and again for each visitor's request can be very inefficient.

Resolving ineffcient code

If you're using a popular CMS like WordPress you can typically use a caching plugin to reduce the resource usage required from having to regenerate the same content over and over again. For more advanced WordPress users your could read about optimizing WordPress with W3 Total Cache plugin or for basic WordPress users about optimizing WordPress with WP Super Cache plugin.

You typically would also want to look at reducing the amount of active extensions, modules, or plugins that you have active. Certain plugins can be known to be more resource intensive than others due to the way they are coded.

If your website is custom coded and isn't using a CMS or orther type of back-end, you'd want to make sure that your scripts can run in a timely manner, typically under 1 second execution time each. The more you attempt to do in each script, the more potential it has for causing a large amount of resource usage. So if you have a script that does a whole lot, you typically wouldn't want that to be one of your scripts that is accessed very frequently such as your front page.

A script with inefficient code in it could eventually lead to an account suspension in extreme cases, especially if there are bots or a large volume of people accessing it. So ensuring that your scripts are coded as efficiently as possible can help safeguard you from this.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!