WordPress : how to create onglet and remove it when only one

I have two extensions : Core where there all the common files and Wooster extension in WordPress.
In Wooster extension I have WoosterPartnerSetup.php and in the Core WoosterSetup.php.
I am trying to to remove the onglet if there is only one but I want the onglet to appear if there are more than 2.

wooster-coreincludesWoosterSetup.php

<?php
// The class cannot be redeclared otherwise it will generate an error
// Class will be in all woobster plugin
if (!class_exists('WoosterSetup')) {
    /**
     * Allows you to display all the extension setup wizards
     */
    class WoosterSetup
    {
        /**
         * Hook to add setup menu to Wooster menu
         */
        public function __construct()
        {
            add_action('wooster_menu', array($this, 'wooster_setup_menu'));

            // Hide the configuration menu if there is no more configuration to do
            if ($this->wooster_configs_steps()) {
                add_action('admin_head', array($this, 'remove_admin_menu'));
            }
        }


        /**
         * Add setup menu to Wooster menu
         * @return void
         */
        public function wooster_setup_menu()
        {
            add_submenu_page(
                'wooster',
                'Assistant d’installation',
                'Installation',
                'manage_options',
                'wooster-setup',
                array($this, 'wooster_setup_partner'),
                1
            );
        }
        public function wooster_setup_partner()
        {
            ?>
            <div class="wrap">
            <!-- Print the page title -->
            <h1><?= __('Assistant d'installation', 'wooster-core') ?></h1>
            <nav class="nav-tab-wrapper">
                <?php
                    do_action('init_onglet');

                ?>
            </nav>

            <div class="tab-content container">
                <?php
                    do_action('tab_onglet_content');
                ?>
            </div>
        </div>
    <?php
        }


        public function add_wooster_tab($tab_name, $tab_content) {
            $tabs = get_option('wooster_tabs', array());
            $tabs[$tab_name] = $tab_content;
            update_option('wooster_tabs', $tabs);
        }

        public function display_wooster_tabs() {
            $tabs = get_option('wooster_tabs', array());
            $num_tabs = count($tabs);

            if ($num_tabs > 1) { // Vérifie s'il y a plus d'un onglet
                echo '<nav class="nav-tab-wrapper">';
                foreach ($tabs as $tab_name => $tab_content) {
                    echo '<a class="nav-tab">' . esc_html($tab_name) . '</a>';
                }
                echo '</nav>';

                echo '<div class="tab-content container">';
                foreach ($tabs as $tab_name => $tab_content) {
                    echo '<div class="tab-pane">' . esc_html($tab_content) . '</div>';
                }
                echo '</div>';
            }
        }


        /**
         * Remove the admin menu
         * @return void
         */
        function remove_admin_menu()
        {
            remove_submenu_page('wooster', 'wooster-setup');
        }

        /**
         * Check if there are any configurations left to do
         * @return boolean
         */
        function wooster_configs_steps()
        {
            // Get the steps from the database
            $steps = maybe_unserialize(get_option('wooster_configs_compagnon', array()));

            // Check if the steps are completed or not
            if (isset($steps['step1']) && ($steps['step1'] )
            && isset($steps['step2']) && ($steps['step2'])
            && isset($steps['step3']) && $steps['step3'])
            {
                return true;
            }
                return false;
        }
    }
    new WoosterSetup();
}

partnerincludesWoosterPartnerSetup.php :

<?php
/**
 * Add setup content to page
 */
class WoosterPartnerSetup
{
    /**
     * Hook to display the contents of the Setup menu
     */
    public function __construct()
    {
        add_action('init_onglet', array($this, 'wooster_partner_setup_content'));
        add_action('tab_onglet_content', array($this, 'wooster_setup_content'));
    }

    /**
     * Add setup content to page
     * @return void
     */
    public function wooster_partner_setup_content()
    {
        $wooster_tabs = new WoosterSetup();
        $wooster_tabs->add_wooster_tab('Compagnon', __('Contenu du compagnon', 'wooster-partner'));


    }

    /**
     * Allows you to display the form to choose the style sheet to display
     *
     * @return void
     */
    function wooster_setup_content()
    {
    ?>
        <!-- Content of the compagnon tab -->
        <div class="tab-content compagnon-content">
            <?php
                do_action('tab_content_setupCompagnon');
            ?>
        </div>
    <?php
    }

}
new WoosterPartnerSetup();

I am trying to understand how onglet are made and the system of hook. I tried to put all the onglet in the option of wordpress and then retrieve it so I can use it for each page of my plugin. Maybe , a simple solution is possible.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật