“Is there a plugin for that?” is the right first question in WordPress. It is the wrong last question. Some of the slowest, least secure sites I have rescued were built entirely from plugins, and some of the best-run sites I maintain rely on a handful of excellent ones. The skill is knowing which is which.
When a plugin is the right answer
I reach for an established plugin or service when the problem is common, security-sensitive or heavily maintained by specialists:
- Backups, firewalls and malware scanning.
- Transactional email delivery (SMTP).
- Caching and CDN integration.
- WooCommerce itself, and official payment-gateway plugins.
- SEO plugins for teams who want to manage metadata themselves.
Rewriting any of these for a client would cost more and be less safe than using the version thousands of sites rely on.
When custom PHP is the better engineering choice
I write custom code when one or more of these is true:
- The rule is specific to the business. A booking that can be rescheduled until three hours after it was created, with the price difference refunded, is not something a generic plugin will express cleanly.
- You would need three plugins and glue to get one feature. Each extra plugin adds updates, settings and attack surface.
- The feature is the business. If online orders or bookings are how the company earns money, it should own and understand that code.
- Performance matters on every page. A plugin that loads its assets site-wide to power one form is a cost every visitor pays.
- The admin has to suit the staff. A front-desk team needs a screen built for their task, not a settings page.
Two real examples
For YOUnique Wellness I built the consultation booking system into the theme instead of embedding a third-party scheduler. The practice needed reminders, self-serve reschedule and cancel links, protection against double-booking and an admin that shows appointments, enquiries and visitors in one place. As a custom module, it does exactly that and nothing else.
For the same site, I did not write a review system. The practice uses an established review widget, because displaying third-party reviews is a solved problem.
What “custom” should look like
Custom code is only an advantage if it is good code. When I write a feature for WordPress, it follows a few rules:
- Built on WordPress’s own hooks, APIs and data types, so it survives core updates.
- Business logic in a plugin (or a clearly separated module), not scattered through templates.
- Inputs validated and sanitised, outputs escaped, capability checks on every admin action.
- Database changes shipped as migrations that are safe to run more than once.
A small example — a hook that changes how a listing query works without editing any template or installing anything:
add_action( 'pre_get_posts', function ( WP_Query $q ) {
if ( ! is_admin() && $q->is_main_query() && $q->is_post_type_archive( 'project' ) ) {
$q->set( 'orderby', array( 'menu_order' => 'ASC', 'date' => 'DESC' ) );
$q->set( 'posts_per_page', 24 );
}
} );
A quick decision checklist
- Is it a common, security-critical problem? Use a trusted plugin.
- Is it how the business makes money, or a rule unique to you? Write it.
- Would you need several plugins to approximate it? Write it.
- Is the plugin abandoned, nulled or loading assets everywhere? Replace it.
If you’re weighing this up for your own site, see custom WordPress development and custom PHP development.