Reading the documentation for ConvertTo-SecureString should give a good idea of why using -AsPlainText is not a good idea.
Basically, any actual secrets should be encrypted or stored as a [SecureString] at all times. There should never be a point where they are stored as plain text, or else they aren't really secret.
Also, this is an error in PSScriptAnalyzer, so anyone using that can't use this module.