Making a spelling mistake is called "misspelling".
It obviously can't be "misgrammaring"...
Here's the full context:
“codes”. This might be considered a “minor grammatical error”, only it isn't. This book deals with code... our profession is creating code. Being a web developer makes you interact with thousands of people online over time, everyone saying “code”, the right way. Why consistently misspell or make a grammatical error with this?
I'd like to condense make a grammatical error with into a single word, a verb that describes the act of "misgrammaring".
<?php $ugly_code = "But can't do much about it."; ?>
is also called "codes" in this book. Even in the few cases where the usage is permissible, I believe conformity is the better approach considering the book is meant for English speaking audiences.