Showing 1,798 of 3,223 total issues
File jquery.ui.accordion.js
has 453 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Accordion 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
Function createIntervalElements
has 171 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createIntervalElements(_interval, _array, _element_parent) {
var inc_time = 0,
_first_run = true,
_last_pos = 0,
Function _preProcess
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_preProcess : function(pl, o) {
var ed = this.editor,
h = o.content,
grep = tinymce.grep,
explode = tinymce.explode,
Function _generateHTML
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_generateHTML: function(inst) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
Function _generateHTML
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_generateHTML: function(inst) {
var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
Function fakeImageResize
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fakeImageResize() {
var selectedElmX, selectedElmY, selectedElm, selectedElmGhost, selectedHandle, startX, startY, startW, startH, ratio,
resizeHandles, width, height, rootDocument = document, editableDoc = editor.getDoc();
if (!settings.object_resizing || settings.webkit_fake_resize === false) {
Function svgPainter
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
wp.svgPainter = ( function( $, window, document, undefined ) {
'use strict';
var selector, base64, painter,
colorscheme = {},
elements = [];
File wplink.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* global ajaxurl, tinymce, wpLinkL10n, tinyMCEPopup, setUserSetting, wpActiveEditor */
var wpLink;
(function($){
var inputs = {}, rivers = {}, ed, River, Query;
Function performAnimation
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, doneCallback) {
var runner = animationRunner(element, animationEvent, className);
if(!runner) {
fireDOMOperation();
Function size
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.size = function( o, done ) {
// Create element
var original, baseline, factor,
el = $( this ),
Function size
has 156 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.effects.effect.size = function( o, done ) {
// Create element
var original, baseline, factor,
el = $( this ),
Function Styles
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
tinymce.html.Styles = function(settings, schema) {
var rgbRegExp = /rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,
urlOrStrRegExp = /(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,
styleRegExp = /\s*([^:]+):\s*([^;]+);?/g,
trimRightRegExp = /\s+$/,
Function applyRngStyle
has 153 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function applyRngStyle(rng, bookmark, node_specific) {
var newWrappers = [], wrapName, wrapElm, contentEditable = true;
// Setup wrapper element
wrapName = format.inline || format.block;
Function svgPainter
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
Open
wp.svgPainter = ( function( $, window, document, undefined ) {
'use strict';
var selector, base64, painter,
colorscheme = {},
elements = [];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function buildData
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildData: function(d) {
VMM.fireEvent(global, VMM.Timeline.Config.events.messege, "Parsing Data");
var _data_obj = VMM.Timeline.DataObj.data_template_obj;
_data_obj.timeline.startDate = new Date(d.content.date.created);;
Function init
has 152 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
init : function() {
var n, t = this, s = t.settings, w, h, mh, e = t.getElement(), o, ti, u, bi, bc, re, i, initializedPlugins = [];
tinymce.add(t);
File jquery.ui.position.js
has 419 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Position 1.10.3
* http://jqueryui.com
*
* Copyright 2013 jQuery Foundation and other contributors
File TileLayer.js
has 415 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* L.TileLayer is used for standard xyz-numbered tile layers.
*/
L.TileLayer = L.Class.extend({
Function parseDate
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (format, value, settings) {
if (format == null || value == null) {
throw "Invalid arguments";
}
Function parseDate
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseDate: function (format, value, settings) {
if (format == null || value == null) {
throw "Invalid arguments";
}