DNN-5943 - Refactorized code and check modules when published tab is requested