Pleading guilty or innocent is not testimony of any kind. Perjury is a crime of false testimony, doesn’t apply.
.............
Look at how often prosecutors offer plea deals to settle a case. Happens constantly, it is not perjury by the prosecutors either.
True, and when the judge asks the defendant under oath whether he's guilty it means something.