XoopsModules25x/tdmpicture

View on GitHub

Showing 256 of 339 total issues

File jquery-1.4.4.js has 4965 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*!
 * jQuery JavaScript Library v1.4.4
 * http://jquery.com/
 *
 * Copyright 2010, John Resig
Severity: Major
Found in assets/js/jquery-1.4.4.js - About 2 wks to fix

    Function Jcrop has 855 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.Jcrop = function (obj, opt) {
            // Initialization {{{
    
            // Sanitize some options {{{
            var obj = obj, opt = opt;
    Severity: Major
    Found in assets/js/jquery.Jcrop.js - About 4 days to fix

      Function jQuery has 550 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          var jQuery = (function () {
      
      // Define a local copy of jQuery
              var jQuery = function (selector, context) {
                      // The jQuery object is actually just the init constructor 'enhanced'
      Severity: Major
      Found in assets/js/jquery-1.4.4.js - About 2 days to fix

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

        /**
         * jquery.Jcrop.js v0.9.8
         * jQuery Image Cropping Plugin
         * @author Kelly Hallman <khallman@gmail.com>
         * Copyright (c) 2008-2009 Kelly Hallman - released under MIT License {{{
        Severity: Major
        Found in assets/js/jquery.Jcrop.js - About 2 days to fix

          Function getVisualization has a Cognitive Complexity of 95 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getVisualization($output)
              {
                  $width          = $this->visual_width;
                  $height         = $this->visual_height;
                  $height_channel = $height / $this->wave_channels;
          Severity: Minor
          Found in class/classAudioFile.php - 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 classAudioFile.php has 690 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          
          /**
           * ****************************************************************************
           *  - TDMPicture By TDM   - TEAM DEV MODULE FOR XOOPS
          Severity: Major
          Found in class/classAudioFile.php - About 1 day to fix

            Function getSampleInfo has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
            Open

                public function getSampleInfo()
                {
                    $valid = true;
            
                    if (false !== strpos(strtoupper($this->wave_filename), 'MP3')) {
            Severity: Minor
            Found in class/classAudioFile.php - 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

            Method mp3info has 297 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function mp3info()
                {
                    $byte             = array();
                    $version          = array('MPEG Version 2.5', false, 'MPEG Version 2', 'MPEG Version 1');
                    $version_bitrate  = array(1, false, 1, 0);
            Severity: Major
            Found in class/classAudioFile.php - About 1 day to fix

              File pdf_paper.php has 660 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              
              //
              //  ------------------------------------------------------------------------ //
              //                XOOPS - PHP Content Management System                      //
              Severity: Major
              Found in include/pdf_paper.php - About 1 day to fix

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

                // ColorBox v1.3.15 - a full featured, light-weight, customizable lightbox based on jQuery 1.3+
                // Copyright (c) 2010 Jack Moore - jack@colorpowered.com
                // Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
                (function ($, window) {
                
                
                Severity: Major
                Found in assets/js/jquery.colorbox.js - About 1 day to fix

                  Function xoops_module_update_tdmpicture has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function xoops_module_update_tdmpicture(XoopsModule $xoopsModule, $previousVersion = null)
                  {
                      global $xoopsConfig, $xoopsDB, $xoopsUser;
                      $moduleDirName = basename(dirname(__DIR__));
                      $capsDirName   = strtoupper($moduleDirName);
                  Severity: Minor
                  Found in include/onupdate.php - 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 utility.php has 525 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  
                  /**
                   * ****************************************************************************
                   *  - TDMPicture By TDM   - TEAM DEV MODULE FOR XOOPS
                  Severity: Major
                  Found in class/utility.php - About 1 day to fix

                    Function Coords has 202 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            var Coords = function ()/*{{{*/ {
                                var x1 = 0, y1 = 0, x2 = 0, y2 = 0, ox, oy;
                    
                                function setPressed(pos)/*{{{*/ {
                                    var pos = rebound(pos);
                    Severity: Major
                    Found in assets/js/jquery.Jcrop.js - About 1 day to fix

                      Function ajax has 196 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              ajax: function (origSettings) {
                                  var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings),
                                      jsonp, status, data, type = s.type.toUpperCase(), noContent = rnoContent.test(type);
                      
                                  s.url = s.url.replace(rhash, "");
                      Severity: Major
                      Found in assets/js/jquery-1.4.4.js - About 7 hrs to fix

                        Function insert has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function insert(XoopsObject $obj, $force = false, $checkObject = true)
                            {
                                if ($checkObject !== false) {
                                    if (!is_object($obj)) {
                                        var_dump($obj);
                        Severity: Minor
                        Found in class/object.php - About 7 hrs 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 thumbnail.inc.php has 450 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        <?php
                        /**
                         * thumbnail.inc.php
                         *
                         * @author      Ian Selby (ian@gen-x-design.com)
                        Severity: Minor
                        Found in class/thumbnail.inc.php - About 6 hrs to fix

                          File xoops_version.php has 446 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          <?php
                          /**
                           * ****************************************************************************
                           *  - TDMPicture By TDM   - TEAM DEV MODULE FOR XOOPS
                           *  - Licence PRO Copyright (c)  (http://www.tdmxoops.net)
                          Severity: Minor
                          Found in xoops_version.php - About 6 hrs to fix

                            Function Selection has 157 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    var Selection = function ()/*{{{*/ {
                                        var start, end, dragmode, awake, hdep = 370;
                                        var borders = {};
                                        var handle = {};
                                        var seehandles = false;
                            Severity: Major
                            Found in assets/js/jquery.Jcrop.js - About 6 hrs to fix

                              Function getForm has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getForm($action = false)
                                  {
                                      global $xoopsUser, $xoopsDB, $xoopsModule;
                                      $moduleDirName = basename(dirname(__DIR__));
                                      $moduleHelper  = Helper::getHelper($moduleDirName);
                              Severity: Minor
                              Found in class/file.php - About 5 hrs 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

                              Method getForm has 135 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function getForm($action = false)
                                  {
                                      global $xoopsUser, $xoopsDB, $xoopsModule;
                                      $moduleDirName = basename(dirname(__DIR__));
                                      $moduleHelper  = Helper::getHelper($moduleDirName);
                              Severity: Major
                              Found in class/file.php - About 5 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language