He aquí el código:
(function($){
  $.fn.XXXX = function(options){
    var defaults = { // Opciones por defecto
      opcion1: ''
      ,opcion2: ''
    }
    var op = $.extend(defaults, options);
    return this.each(function(){
      $(this).XXXX();
    });
  }
})(jQuery);