Currently one can not allow plugins to have empty JSON metadata, without having them considered invalid.
However we have usecases where we want to load a plugin without having to embed json metadata, for example a KCM in a KPluginWidget, a KPart in Kontacts by name or an Plasma Applet where we have the metadata in KPackage available.
This could be implemented by adding a enum parameter to the KPluginMetaData(const QString &filename) constructor. Possible values would be AllowEmptryMetaData, NotAllowEmptyMetaData. By adding an assertion one could ensure that the constructor is only called for plugins and not desktop/json files. KPluginMetaData::findPlugins would also need an overload taking such an enum parameter.
Relates to T14983.