Fortunately you don’t need to have users “load code they never use” (not that it would matter, actually, modern servers and PHP could probably load an entire App that is never used without even affecting any load time). You can use Best practice to detect a ClassicPress Install | ClassicPress Documentation to check if it is a CP install for example, and load your “CP only” code or not load “WP only” code depending on that.
However my plugins for example run on both WP and CP, and I never came across the need to separate the code bases. As long your plugin is compatible with WP 4.9, there’s no need to do this acrobatic exercise.
Of course, if your plugin is not compatible with that version of WP, it would probably just be better to not ship that plugin to CP/make another plugin that actually works with CP/WP 4.9
It is certainly not within our goals to start including either shims for blocks, or actual blocks related code.
Not only because the very core of CP is “no blocks”, but because it is useless to start with. Blocks will not work on CP no matter what.
As for the other new features/functions that WP has and CP does not, I rather would prefer we actually spend time maintaining security (which has been and still is honestly lacking, even if the parts that should receive updates are hard to exploit, or close to impossible, they are there/have been there way too long), and adding new features unique to CP or improving existing features, something that will actually distinguish CP from WP rather than making it a zombie-frankenstein-doppelganger of WP.
I would also like to reply to
Search for ClassicPress stuff and you won’t find much if anything at all.
We have a 100% covered documentation for CP at https://docs.classicpress.net/
The reason you can’t find results in google when searching, is mostly that this is mostly duplicate content and google of course will prioritise the original + the one that 50K users click on it, versus 1.
Another reason to actually start distinguishing CP from WP by adding new, unique features and not copy even more. That just gives us the image of the “copy pasta wannabes”.
There are unfortunately not many people talking about CP in their blogs or else, and that is the other reason you can’t find lots of contents or how to’s in the net. That, is entirely up to the community and its users (which as in any community, have a lack of contribution willingness and are not involving personally. This is just normal, and the only reason WP is so widely covered is that it grew to be a giant powering over 50% of the web probably. This happened because while WP Grew, it was basically the only viable solution, and probably still is, for noobs to devs. This may, or may not change in CP overtime. Not if we keep being the copy pasta folks, however, that much is sure.)