The foregoing provisions as to securing or paying costs before suit brought, and requiring security for costs after suit commenced, and as to rendering judgment against the plaintiff and surety, shall apply to justices of the peace, and the courts held by them as such, or in proceedings in unlawful entry and detainer, or in any other proceeding; but in those courts the security, when required after the commencement of a suit, shall be given within ten days after the order of the court made for that purpose.