In all recognizances by any person for keeping the peace, good behavior or appearing as a party, surety or witness at any court of criminal jurisdiction within the State the sum of money in which any such person shall be bound shall be made payable to the State and every such recognizance shall be good and effectual in law provided it be signed by every party thereto in the presence of a judge, clerk of a court of common pleas, magistrate or notary public who shall sign the recognizance as a witness.