First of all you need to understand that code plugin and C++ game project is no different, the only difference is how you code module is distributed and enabled, if you put code from C++ game project it will work the same. By writing C++ in UE4 no matter where you technically extending engine code (you just adding you modules to already exiting pool of enigne modules) and your code has same potential as engine source it self (Except having access to private part of module in engine, but that limitation that other engine modules even facing). uplugin is practicly same as uproject file in most part, you got same list of modules and it works the same in both files.
Also impotent to understand is if you compile C++ code to run it in editor, you technically also extending editor it self, you code runs as part of editor (this included game code). When you compile. And yes this means you don’t need a plugin to extend editor, you can do that from C++ game project, as well as plugin don’t need to extend editor you can have some runtime code like Actor classes and they will work the same as you would do that in game code, you only need a plugin to run the same code in multiple projects.
Both facts are main reason why error in your code, crashing the engine and editor, not to mention editor it self technically runs on engine it self. You code becomes part of it, lot of people don’t like it, but on other hand together with fact you can edit engine source code it gives you full control on engine, unlike Unity for example
Editor APIs are only available when you build your module for editor, when you package the game all Editor APIs are gone. That why it impotent to separate runtime code from editor, most common practice is to create 2 modules for runtime and editor, if you need to use editor code in runtime code you can also use
#if WITH _EDITOR
//You editor code here
#endif
If you plan on extending editor UI it very importent to learn Slate, this is where you should start. If you used UMG you should have general idea how Slate works as UMG is powered by Slate too (techicly is a Blueprint wrapper of Slate). Slate originally was made to be be framework for editor, but it became so powerful that it can be also used in games and UE4 let you do that (both directly and via UMG). You can read about it here:
Now biggest problem is fact that editor part of the engine is burly documented, UE4 documentation team have problem to keep up with growing UE4 that they usually omitt anything related to editor. They assume you can figure everything your self by looking on source code, which is number one information source how to do things in editor, remeber that you extending engine code, so editor features been added same way as it would be plugin, so by looking on source code oyu can apply same practices in you editor code.
Also because UIs in edior is hard coded in respective module in majority of cases you can not directly change it without modifying engine code. Thats why there extender system allowing you to add menu items and widgets in specific entry points , it explained in this of video (it’s quite old but the principles are still the same):
It's not very streamlined system, as each module need to have it's on extender entry point, to extending main level editor window and extend blueprint editor for example you need to talk to 2 different modules APIs which might be annoying to find sometimes (API reference should help you).
Good training for oyu should be looking in to how other plugins are made and agian look also in to engine source code.
There lot of tutorials oyu can find on internet too, just google specific things you want to do.