mambax7/pedigree

View on GitHub

Showing 702 of 1,100 total issues

Function ImageMagickThumbnailToGD has a Cognitive Complexity of 566 (exceeds 5 allowed). Consider refactoring.
Open

    public function ImageMagickThumbnailToGD()
    {
        // http://www.imagemagick.org/script/command-line-options.php

        $this->useRawIMoutput = true;
Severity: Minor
Found in phpthumb/phpthumb.class.php - About 1 wk 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 phpthumb.class.php has 3883 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
//////////////////////////////////////////////////////////////
//   phpThumb() by James Heinrich <info@silisoftware.com>   //
//        available at http://phpthumb.sourceforge.net      //
//         and/or https://github.com/JamesHeinrich/phpThumb //
Severity: Major
Found in phpthumb/phpthumb.class.php - About 1 wk to fix

    Function ImageMagickThumbnailToGD has a Cognitive Complexity of 536 (exceeds 5 allowed). Consider refactoring.
    Open

        public function ImageMagickThumbnailToGD()
        {
            // http://www.imagemagick.org/script/command-line-options.php
    
            $this->useRawIMoutput = true;
    Severity: Minor
    Found in 0old/phpthumb/phpthumb.class.php - About 1 wk 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 phpthumb.class.php has 3797 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    //////////////////////////////////////////////////////////////
    //   phpThumb() by James Heinrich <info@silisoftware.com>   //
    //        available at http://phpthumb.sourceforge.net      //
    //         and/or https://github.com/JamesHeinrich/phpThumb //
    Severity: Major
    Found in 0old/phpthumb/phpthumb.class.php - About 1 wk to fix

      Function ApplyFilters has a Cognitive Complexity of 241 (exceeds 5 allowed). Consider refactoring.
      Open

          public function ApplyFilters()
          {
              if ($this->fltr && is_array($this->fltr)) {
                  if (!include_once __DIR__ . '/phpthumb.filters.php') {
                      $this->DebugMessage('Error including "' . __DIR__ . '/phpthumb.filters.php" which is required for applying filters (' . implode(';', $this->fltr) . ')', __FILE__, __LINE__);
      Severity: Minor
      Found in phpthumb/phpthumb.class.php - About 4 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 ApplyFilters has a Cognitive Complexity of 239 (exceeds 5 allowed). Consider refactoring.
      Open

          public function ApplyFilters()
          {
              if ($this->fltr && is_array($this->fltr)) {
                  if (!require_once __DIR__ . '/phpthumb.filters.php') {
                      $this->DebugMessage('Error including "' . __DIR__ . '/phpthumb.filters.php" which is required for applying filters (' . implode(';', $this->fltr) . ')', __FILE__, __LINE__);
      Severity: Minor
      Found in 0old/phpthumb/phpthumb.class.php - About 4 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 color has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
      Open

          color: function (target, prop) {
      
      
              this.required = true; // refuse empty values?
              this.adjust = true; // adjust value to uniform notation?
      Severity: Minor
      Found in assets/js/jscolor/jscolor.js - About 4 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 userfields has a Cognitive Complexity of 183 (exceeds 5 allowed). Consider refactoring.
      Open

      function userfields($field = 0)
      {
          global $field;
          require_once __DIR__ . '/include/checkoutwizard.php';
      
      
      Severity: Minor
      Found in tools.php - About 3 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 getid3_bmp has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getid3_bmp(&$BMPdata, &$ThisFileInfo, $ExtractPalette = false, $ExtractData = false)
          {
              // shortcuts
              $ThisFileInfo['bmp']['header']['raw'] = [];
              $thisfile_bmp                         = &$ThisFileInfo['bmp'];
      Severity: Minor
      Found in phpthumb/phpthumb.bmp.php - About 3 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 jquery.magnific-popup.js has 1325 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*! Magnific Popup - v1.1.0 - 2016-02-20
      * http://dimsemenov.com/plugins/magnific-popup/
      * Copyright (c) 2016 Dmitry Semenov; */
      ;(function (factory) {
      if (typeof define === 'function' && define.amd) {
      Severity: Major
      Found in assets/js/jquery.magnific-popup.js - About 3 days to fix

        Function color has 670 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            color: function (target, prop) {
        
        
                this.required = true; // refuse empty values?
                this.adjust = true; // adjust value to uniform notation?
        Severity: Major
        Found in assets/js/jscolor/jscolor.js - About 3 days to fix

          Method ImageMagickThumbnailToGD has 663 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function ImageMagickThumbnailToGD()
              {
                  // http://www.imagemagick.org/script/command-line-options.php
          
                  $this->useRawIMoutput = true;
          Severity: Major
          Found in phpthumb/phpthumb.class.php - About 3 days to fix

            File phpthumb.filters.php has 1242 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            //////////////////////////////////////////////////////////////
            //   phpThumb() by James Heinrich <info@silisoftware.com>   //
            //        available at http://phpthumb.sourceforge.net      //
            //         and/or https://github.com/JamesHeinrich/phpThumb //
            Severity: Major
            Found in phpthumb/phpthumb.filters.php - About 3 days to fix

              Method ImageMagickThumbnailToGD has 643 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function ImageMagickThumbnailToGD()
                  {
                      // http://www.imagemagick.org/script/command-line-options.php
              
                      $this->useRawIMoutput = true;
              Severity: Major
              Found in 0old/phpthumb/phpthumb.class.php - About 3 days to fix

                Function SourceImageToGD has a Cognitive Complexity of 139 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function SourceImageToGD()
                    {
                        if (is_resource($this->gdimg_source) || (is_object($this->gdimg_source) && $this->gdimg_source instanceof \GdImage)) {
                            $this->source_width  = imagesx($this->gdimg_source);
                            $this->source_height = imagesy($this->gdimg_source);
                Severity: Minor
                Found in phpthumb/phpthumb.class.php - 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 SourceImageToGD has a Cognitive Complexity of 125 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function SourceImageToGD()
                    {
                        if (is_resource($this->gdimg_source)) {
                            $this->source_width  = imagesx($this->gdimg_source);
                            $this->source_height = imagesy($this->gdimg_source);
                Severity: Minor
                Found in 0old/phpthumb/phpthumb.class.php - 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 tools.php has 964 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                <?php
                /*
                 You may not change or alter any portion of this comment or credits
                 of supporting developers from this source code or any supporting source code
                 which is considered copyrighted (c) material of the original comment or credit authors.
                Severity: Major
                Found in tools.php - About 2 days to fix

                  File phpthumb.functions.php has 962 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  //////////////////////////////////////////////////////////////
                  //   phpThumb() by James Heinrich <info@silisoftware.com>   //
                  //        available at http://phpthumb.sourceforge.net      //
                  //         and/or https://github.com/JamesHeinrich/phpThumb //
                  Severity: Major
                  Found in phpthumb/phpthumb.functions.php - About 2 days to fix

                    File jscolor.js has 943 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /**
                     * jscolor, JavaScript Color Picker
                     *
                     * @version 1.4.3
                     * @license GNU Lesser General Public License, https://www.gnu.org/copyleft/lesser.html
                    Severity: Major
                    Found in assets/js/jscolor/jscolor.js - About 2 days to fix

                      File coi.php has 922 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      /*
                       You may not change or alter any portion of this comment or credits of
                       supporting developers from this source code or any supporting source code
                       which is considered copyrighted (c) material of the original comment or credit
                      Severity: Major
                      Found in coi.php - About 2 days to fix
                        Severity
                        Category
                        Status
                        Source
                        Language