So you want to add a tab in the settings? The following code taken from the password plugin should add a tab:
if (window.rcmail) {
rcmail.addEventListener('init', function(evt) {
var tab = $('<span>').attr('id', 'settingstabpluginxxxx').addClass('tablink xxxx');
var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.xxxx').html(rcmail.gettext('xxxx')).appendTo(tab);
rcmail.add_element(tab, 'tabs');
}
}