Rewrite auto-detection method. No need to store current logic in database option as it's super fast already.