Web Development

What Is a WordPress Plugin? How They Work and How to Choose One

What is a WordPress plugin? Learn how plugins work, how they differ from themes, how to install and choose them safely, and when a custom plugin pays off.

Published Updated 7 min read

On this page 10 sections
A hand tightening a clamp on a navy toolbox fitted to the roof bars of a plain navy bakkie.
A hand tightening a clamp on a navy toolbox fitted to the roof bars of a plain navy bakkie.

A WordPress plugin is a package of code that adds a feature to a WordPress website, such as an online shop, a contact form or a backup tool. WordPress handles the basics, and plugins add everything else.

WordPress is used by 38.5% of all websites, according to W3Techs (19 November 2026), so plugins sit behind a large share of business websites. This guide explains how plugins work, how they differ from themes, how to choose and install them safely, and when it makes sense to have a custom one built.

Short answer

  • What it is: a package of code, mostly PHP, that extends WordPress. It can also include images, CSS and JavaScript.
  • What it does: adds features WordPress does not have by default. WooCommerce, for example, adds an online shop.
  • Plugin or theme: a theme controls how your site looks. A plugin controls what it can do.
  • Where plugins come from: the official directory lists over 79,000 free plugins, other developers sell paid ones, and you can have one built for you.
  • The catch: Patchstack, a WordPress security company, found that 91% of new WordPress vulnerabilities in 2025 were in plugins. Install fewer, choose carefully and keep them updated.

How do WordPress plugins work?

WordPress itself covers the basics, such as publishing content and managing users. Plugins build on top of it, so the core stays lean and each site gains only the features it needs.

At its simplest, a plugin is one PHP file with a header comment that tells WordPress what the plugin is. Most plugins have many files, and they live in the wp-content/plugins folder of your site. A plugin does nothing until you activate it.

Plugins connect to WordPress through hooks. A hook is a set point where code can step in. Actions let a plugin add something or run a task at that point. Filters let it change data, such as text, before visitors see it.

Hooks let a plugin change how WordPress behaves without editing any core files. That matters because the developer handbook's first rule is not to edit WordPress core, and WordPress overwrites its core files with each update, so such edits would be lost.

Plugin or theme: what is the difference?

A theme controls how your site looks. A plugin controls what it does. The difference matters the day you change your design.

ThemePlugin
ControlsColours, fonts and layoutFeatures and behaviour
ExamplesA new design for your pagesAn online shop, forms, SEO tools
If you switch themesThe look changesFeatures keep working, if they live in a plugin

WordPress's own guidance is that features which should work whatever the site looks like belong in a plugin, not in the theme. A booking form built into your theme can disappear on your next redesign.

What can plugins do?

WordPress's documentation lists spam control, SEO, data import and export, e-commerce, security and caching among the popular kinds. Here are four examples from the Popular list of the WordPress Plugin Directory:

JobExampleWhat it does
Online shopWooCommerceTurns a WordPress site into an online store
SEOYoast SEOGives content guidance and adds structured data to help a site perform in search
FormsContact Form 7Adds contact forms
SpeedLiteSpeed CacheAdds caching and optimises images, CSS and JavaScript

Each lists millions of active installations: over 7 million for WooCommerce and LiteSpeed Cache, and over 10 million for Yoast SEO and Contact Form 7. W3Techs reports that WooCommerce runs on 19.7% of WordPress websites. These are examples, not recommendations, and we have no connection with their makers.

WooCommerce shows how far a plugin can go: its own documentation says each store is built on a WordPress website.

Where do WordPress plugins come from?

  • The WordPress Plugin Directory. It lists over 79,000 free plugins. Plugins hosted there must follow the directory's guidelines, which include being compatible with the GNU General Public License and not tracking users without their consent.
  • Paid plugins. Many premium plugins are downloaded from outside the directory, often from the developer's own website, and you install them by uploading a zip file.
  • Custom plugins. A developer builds one for your business when nothing off the shelf fits. The WordPress handbook gives a support ticketing system with email notifications and a client portal as an example of what a plugin can be.

How do you install a WordPress plugin?

  1. In your WordPress dashboard, go to Plugins > Add New.
  2. Search for the plugin and click Install Now.
  3. Click Activate. The plugin only starts working once it is activated.
  4. For a paid plugin you downloaded as a zip file, click Upload Plugin, choose the file, then install and activate it.
  5. To stop using a plugin, deactivate it, then click Delete.

If a host does not allow automatic installs, the plugin folder can be copied to the site by SFTP, which is a job for a developer. WordPress's guide also says to have a current backup before you update any plugin.

Are WordPress plugins safe?

A plugin is code that runs on your site, so a flaw in one can be a way in for attackers. WordPress's own guide says plugins in the directory are tested, but that quality varies.

Patchstack's State of WordPress Security in 2026 report (updated 25 February 2026) gives the scale:

  • 11,334 new vulnerabilities were found in 2025, up 42% on 2024.
  • 91% were in plugins and 9% in themes. Only 6 were in WordPress core.
  • 46% had no fix from the developer when they were made public.
  • For heavily targeted flaws, the median time to the first attack was 5 hours.

Patchstack sells security products, so treat these as one vendor's figures. The lesson holds: updating WordPress itself is not enough, because most problems are in plugins.

WordPress.org also helps you spot trouble. A yellow notice means a plugin has not been tested with the latest 3 major WordPress releases and may no longer be maintained. A plugin can also be closed, and a security issue is one of the listed reasons. If your site is already hacked, read what to do if your website is hacked.

How do you choose a plugin?

CheckWhere to lookWhy it matters
Is it maintained?"Last updated" and "Tested up to" on its directory pageA yellow warning means it may be abandoned
Do you need it?Plugins > Installed PluginsEvery extra plugin is more code to keep updated
Does it work with your version?The compatibility note on the Add New screenUntested plugins can cause errors
Do people use it and get help?Active installations, reviews and the support tabUnanswered support threads are a warning sign
Who stands behind a paid one?The developer's update and support termsPaid plugins are harder for outside researchers to inspect, according to Patchstack

Take a backup before you update. For plugins you trust, you can switch on automatic updates one plugin at a time under Plugins > Installed Plugins. This has been possible since WordPress 5.5.

When is a custom plugin worth it?

An off-the-shelf plugin is usually the right first choice. A custom plugin makes sense when:

  • No existing plugin does what you need.
  • Your site must connect to another system, such as accounting or stock. WooCommerce, for example, offers a REST API and hooks for developers.
  • You are stacking several plugins to do one job.
  • The plugin you rely on is no longer maintained.

A custom plugin should follow WordPress's own standards and use hooks, so it keeps working through updates, and it should not live in your theme. For the wider question of buying or building, read bespoke vs off-the-shelf software.

Need help with your WordPress plugins?

If you are not sure which plugins your site needs, or which ones to remove, talk to our web development team. For a custom plugin or a link to your other systems, see our software development work, or contact us and tell us what you need. We will reply within 2 working days.

Facts checked on 19 November 2026. Sources: WordPress Plugin Handbook (opens in a new window), Plugin Basics (opens in a new window), Manage Plugins (opens in a new window), WordPress Plugin Directory (opens in a new window), Patchstack State of WordPress Security in 2026 (opens in a new window), W3Techs (opens in a new window). WordPress is a trademark of the WordPress Foundation. WooCommerce, Yoast SEO, Contact Form 7 and LiteSpeed Cache are names of their respective owners. Mammoth Digital is not affiliated with or endorsed by any of them.

Let's work together

Ready to talk?

Tell us what you need. We'll reply within 2 working days.

Get in touch