Add support for checksum verification of must-use plugins
As discussed in https://github.com/wp-cli/checksum-command/pull/26#discussion_r158490573 , the plugin checksum verification currently ignores must-use plugins.
Should these be checked by default? ... or only through an additional flag?
I think I'd prefer to have them be included in the checks by default, with a flag to omit them if they should cause trouble.
Where would checksums of MU plugins come from?
The plugin header file can be checked to retrieve the plugin slug.
This works well for normal plugins that were moved into the mu-plugins folder and an MU-loader system like the one from Bedrock or WP-Starter takes care of actually loading them.
It won't work so well for:
- Individual plugin files that were put there just to trigger the loading of a subfolder plugin.
- Individual plugin files that contain custom logic for that site.
For now, we should throw warnings when 1. or 2. are found, as erroring out would make MU-plugins mostly unusable in terms of checksum verification.
I solve a lot of problems in single-file MU plugins. At least 10 MU-s are installed per site.
It would be great to have checksums in a list like
mu-file-name.php<TAB>hash-hash-hash
owned by root and having 0644 permissions.