AllMangasReader-dev/AMR

View on GitHub

Showing 292 of 636 total issues

File popup.js has 2563 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**

  This file is part of All Mangas Reader.
  
  All Mangas Reader is free software: you can redistribute it and/or modify
Severity: Major
Found in js/popup.js - About 1 wk to fix

File background.js has 2051 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**

  This file is part of All Mangas Reader.

  All Mangas Reader is free software: you can redistribute it and/or modify
Severity: Major
Found in js/background.js - About 5 days to fix

File back.js has 1448 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**

  This file is part of All Mangas Reader.

  All Mangas Reader is free software: you can redistribute it and/or modify
Severity: Major
Found in js/back.js - About 3 days to fix

Function mergeLists has a Cognitive Complexity of 146 (exceeds 5 allowed). Consider refactoring.
Open

function mergeLists(server, exten) {
  var lstres = [];
  
  setChapNoTot(server);
  setChapNoTot(exten);
Severity: Minor
Found in js/listmanager.js - About 2 days to fix

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 bindActions has 477 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function bindActions() {
  "use strict";
  $("#mgSearchBtn").unbind();
  $("#mgSearchBtn").add($("#mgListBtn")).click(function () {
    if (!$(this).hasClass("checked")) {
Severity: Major
Found in js/popup.js - About 2 days to fix

File listmanager.js has 849 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**

  This file is part of All Mangas Reader.
  
  All Mangas Reader is free software: you can redistribute it and/or modify
Severity: Major
Found in js/listmanager.js - About 2 days to fix

Function BSync has a Cognitive Complexity of 101 (exceeds 5 allowed). Consider refactoring.
Open

function BSync (_opt) {

    this.options = {};

    this.initialize = function (_19) {
Severity: Minor
Found in js/BSync.js - About 2 days to fix

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

File lab.js has 806 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**

  This file is part of All Mangas Reader.

  All Mangas Reader is free software: you can redistribute it and/or modify
Severity: Major
Found in js/lab.js - About 1 day to fix

Function BSync has 352 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function BSync (_opt) {

    this.options = {};

    this.initialize = function (_19) {
Severity: Major
Found in js/BSync.js - About 1 day to fix

Function renderMg has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
Open

function renderMg() {
  "use strict";
  mangas = [];
  months = [];
  days = [];
Severity: Minor
Found in js/pstat.js - About 1 day to fix

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

File mgEntry.js has 565 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**

  This file is part of All Mangas Reader.

  All Mangas Reader is free software: you can redistribute it and/or modify
Severity: Major
Found in js/mgEntry.js - About 1 day to fix

File pstat.js has 565 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**

  This file is part of All Mangas Reader.
  
  All Mangas Reader is free software: you can redistribute it and/or modify
Severity: Major
Found in js/pstat.js - About 1 day to fix

Function bindFoot has 219 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function bindFoot() {
  "use strict";
  $("#time").click(function () {
    $(".bottomdiv").each(function (index) {
      if ($(this).is(":visible") && !$(this).hasClass("timers")) {
Severity: Major
Found in js/popup.js - About 1 day to fix

File bookmarks.js has 528 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var mirrors;
var bmsAll;
function openTab(urlToOpen) {
  "use strict";
  chrome.runtime.sendMessage({
Severity: Major
Found in js/bookmarks.js - About 1 day to fix

Function MangaElt has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
Open

function MangaElt(obj) {
  "use strict";
  this.mirror = obj.mirror;
  this.name = obj.name;
  this.url = obj.url;
Severity: Minor
Found in js/MangaElt.js - About 1 day to fix

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 writeNavigation has 213 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function writeNavigation(where, select, res, params) {
    "use strict";
    var div = $("<div id='bookmarkPop' style='display:none'></div>"),
        btn = $("<a id='saveBtnAMR' class='buttonAMR'>Save</a>");
    $("<h3>Bookmark</h3>").appendTo(div);
Severity: Major
Found in js/back.js - About 1 day to fix

Function displayList has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
Open

function displayList(lst, updtSrv, where, noinfo) {
  if (where == undefined) {
    where = $("#mangalist");
  }
  if (noinfo == undefined) {
Severity: Minor
Found in js/listmanager.js - About 1 day to fix

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 MangaElt has 176 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function MangaElt(obj) {
  "use strict";
  this.mirror = obj.mirror;
  this.name = obj.name;
  this.url = obj.url;
Severity: Major
Found in js/MangaElt.js - About 7 hrs to fix

Function renderMg has 172 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function renderMg() {
  "use strict";
  mangas = [];
  months = [];
  days = [];
Severity: Major
Found in js/pstat.js - About 6 hrs to fix

File popupSearch.js has 448 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
  This file is part of All Mangas Reader.

  All Mangas Reader is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
Severity: Minor
Found in js/popupSearch.js - About 6 hrs to fix
Severity
Category
Status
Source
Language