pavelk2/social-feed

View on GitHub

Showing 7 of 20 total issues

Function socialfeed has 702 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    $.fn.socialfeed = function(_options) {


        var defaults = {
            plugin_folder: '', // a folder in which the plugin is located (with a slash in the end)
Severity: Major
Found in js/jquery.socialfeed.js - About 3 days to fix

    File jquery.socialfeed.js has 713 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    if (typeof Object.create !== 'function') {
        Object.create = function(obj) {
            function F() {}
            F.prototype = obj;
            return new F();
    Severity: Major
    Found in js/jquery.socialfeed.js - About 1 day to fix

      Function render has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  render: function() {
                      var rendered_html = Feed.template(this.content);
                      var data = this.content;
      
                      if ($(container).children('[social-feed-id=' + data.id + ']').length !== 0) {
      Severity: Minor
      Found in js/jquery.socialfeed.js - About 1 hr to fix

        Function getData has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                        getData: function(account) {
        
                            var cb = new Codebird();
                            cb.setConsumerKey(options.twitter.consumer_key, options.twitter.consumer_secret);
        
        
        Severity: Minor
        Found in js/jquery.socialfeed.js - About 1 hr to fix

          Function unifyPostData has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                              unifyPostData: function(element) {
                                  var post = {};
          
                                  post.id = element.id;
                                  post.attachment = '';
          Severity: Minor
          Found in js/jquery.socialfeed.js - About 1 hr to fix

            Function unifyPostData has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                                unifyPostData: function(wall_owner, element, json) {
                                    var post = {};
            
                                    post.id = element.id;
                                    post.dt_create = moment.unix(element.date);
            Severity: Minor
            Found in js/jquery.socialfeed.js - About 1 hr to fix

              Avoid deeply nested control flow statements.
              Open

                                                          if (this.thumbnails && this.thumbnails.length > 0) {
                                                              if (this.thumbnails[0].image) {
                                                                  image = this.thumbnails[0].image.url;
                                                              }
                                                          }
              Severity: Major
              Found in js/jquery.socialfeed.js - About 45 mins to fix
                Severity
                Category
                Status
                Source
                Language