public static function registerSettingsGroup($groupName, $options)
    {
        // iterate through all settings fields groups and build it
        foreach ($options as $section) {
            // first, create the section
            add_settings_section($section['id'], $section['title'], $section['callback'], $section['page']);
            // iterate through all fields in the section and add it
            foreach ($section['fields'] as $field) {
                // register the settings
                register_setting($groupName, $field['id']);
                // set the callback args
                $args = array(
                    'label_for' => $field['id'],
                    'id' => $field['id'],
                    'type' => $field['type'],
                );
                // add the settings field
                add_settings_field($field['id'], $field['title'], function ($args) {
                    if (isset($args['type'])) {
                        $value = get_option($args['id']);
                        $extraParams = '';
                        // set default field type if necessary
                        switch ($args['type']) {
                            case 'text':
                                // no break
                            case 'password':
                                // no break
                            case 'number':
                                // let it pass...
                                break;
                            case 'checkbox':
                                // let it pass...
                                $extraParams = sprintf(' %s', $value ? 'checked="checked"' : '');
                                $value = 1;
                                break;
                            default:
                                // fallback on text
                                $args['type'] = 'text';
                                break;
                        }
                    } else {
                        // set the default type
                        $args['type'] = 'text';
                    }
                    echo sprintf(
                        '<input id="%s" type="%s" name="%s" value="%s" size="80" %s />',
                        $args['id'],
                        $args['type'],
                        $args['id'],
                        $value,
                        $extraParams
                    );
                }, $section['page'], $section['id'], $args);
            }
        }
    }