insideout10/wordlift-plugin-js

View on GitHub
app/admin_files/wplink.js

Summary

Maintainability
C
1 day
Test Coverage

File wplink.js has 439 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* global ajaxurl, tinymce, wpLinkL10n, tinyMCEPopup, setUserSetting, wpActiveEditor */
var wpLink;

(function($){
    var inputs = {}, rivers = {}, ed, River, Query;
Severity: Minor
Found in app/admin_files/wplink.js - About 6 hrs to fix

    Function mceUpdate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            mceUpdate : function() {
                var ed = tinyMCEPopup.editor,
                    attrs = wpLink.getAttrs(),
                    e, b;
    
    
    Severity: Minor
    Found in app/admin_files/wplink.js - About 1 hr to fix

      Function htmlUpdate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              htmlUpdate : function() {
                  var attrs, html, begin, end, cursor, selection,
                      textarea = wpLink.textarea;
      
                  if ( ! textarea )
      Severity: Minor
      Found in app/admin_files/wplink.js - About 1 hr to fix

        Function init has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                init : function() {
                    inputs.dialog = $('#wp-link');
                    inputs.submit = $('#wp-link-submit');
                    // URL
                    inputs.url = $('#url-field');
        Severity: Minor
        Found in app/admin_files/wplink.js - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status