Determining if $G$ contains $K_4$ as a minor in polynomial time
I think your best bet would be to implement a treewidth 2 algorithm.  We implemented one for an android app and you can find the source code of this specific implementation here: Treewidth.  You can probably modify it to run in $O(n^4)$ time.