if (json["total"] === 0) {
location.reload();
}
This code at least indicates a reload of the page, but if the page is cached, the request leads to nothing and keeps repeating, or the page keeps reloading. Delete this plugin, at least temporarily, and test it, but don't forget to purge the cache.