If you approach a lot of WordPress plugin development from an object-oriented perspective, then you’re eventually going to hit a point where you’re not doing a lot of interaction directly with WordPress core itself.
And, in my mind, that’s a good thing. It’s a sign of an architecture that you’re properly structuring your code. That is:
- You have WordPress sitting at the foundational level,
- You have a set of classes that are sitting just above WordPress responsible for sending information to and from WordPress between the plugin,
- And you have the rest of your code that comprises the rest of the functionality.
How this is implemented can vary, but the general way I picture this is the same way I tend to think of the standard N-tier application where you have the data layer, application layer, and front-end.
Except for this time, you have the WordPress, a layer for communicating with WordPress and the rest of your code, and, you know, the rest of your code.

How a plugin may be organized.
So what happens when you want to stop plugin execution when it has to interact with a third-party dependency and should only execute if that dependency is present?

