Well I think it's efficient as a first guess of the format. Whether or not it is really what it "pretends" to be should be handled by the linked application.
The fact that you used .cpp
makes it quite clear how important extensions are. You immediately assume that it is C++, because we are so used to it. Plus filtering is fast and easy (cause you don't have to check the content in the first step).
Anyway, this is not a feature I need desperately, but it would help to identify Node-RED flows in our cloud system and link them to a flow viewer application. And instead of using a special file extension internally only, I thought others could benefit from this, maybe.