The First Refactor: Theme, Plugin, Breathing Room

June 24, 2026 Lubinik Journal

The first big refactor was not the final Lubinik architecture. It was more like opening a window in a room that had become too full.

The BnB theme had reached the point where the problem was obvious: the theme contained both the generic foundation of a website and the specific logic of one business type. Those two things were moving at different speeds, but they were trapped together.

So the project split into a parent theme and a plugin layer.

The parent theme could focus on site structure: headers, footers, menus, generic templates, page sections, shared frontend behavior, and the things a site needs before it becomes a BnB, a shelter, a portfolio, a comic archive, or anything else.

The plugin layer could carry the plugin-side behavior: custom post types, admin logic, shortcodes, galleries, calendars, and the pieces that did not belong directly in the theme.

Still not clean, but already better

At that moment, the plugin was not yet the clean domain-agnostic core plugin it would become later. It still contained a lot of BnB-oriented code. But the first boundary had appeared, and that changed the way I looked at the whole project.

The theme should not know everything. The plugin should not become a dumping ground either. But separating them gave me room to ask better questions.

Is this a generic site feature? Is this plugin-side infrastructure? Or is this only true for this one project?

That question became the beginning of the Lubinik architecture.