  We present an algorithm running in time O(n ln n) which decides if a
wreath-closed permutation class Av(B) given by its finite basis B contains a
finite number of simple permutations. The method we use is based on an article
of Brignall, Ruskuc and Vatter which presents a decision procedure (of high
complexity) for solving this question, without the assumption that Av(B) is
wreath-closed. Using combinatorial, algorithmic and language theoretic
arguments together with one of our previous results on pin-permutations, we are
able to transform the problem into a co-finiteness problem in a complete
deterministic automaton.
