mambax7/extgallery

View on GitHub

Showing 701 of 9,653 total issues

Function _initKeys has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function _initKeys( $wrpr, opts )
    {
        if ( opts.prev.key || opts.next.key || opts.close.key )
        {
            $(document).bind(
Severity: Minor
Found in assets/js/TosRUs/src/js/jquery.tosrus.js - About 1 hr to fix

    Method extgallery_tag_iteminfo has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function extgallery_tag_iteminfo(&$items)
    {
        if (empty($items) || !is_array($items)) {
            return false;
        }
    Severity: Minor
    Found in class/plugins/plugin.tag.php - About 1 hr to fix

      Method staticPushErrorHandling has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static function staticPushErrorHandling($mode, $options = null)
          {
              $stack       = &$GLOBALS['_PEAR_error_handler_stack'];
              $def_mode    = &$GLOBALS['_PEAR_default_error_mode'];
              $def_options = &$GLOBALS['_PEAR_default_error_options'];
      Severity: Minor
      Found in class/pear/PEAR.php - About 1 hr to fix

        Method get_image_url has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function get_image_url()
            {
                // Get the image file path
                if (!mb_strlen($this->path)) {
                    return $this->url;
        Severity: Minor
        Found in assets/js/ml-slider/inc/metaslider.imagehelper.class.php - About 1 hr to fix

          Method _dirToStruct has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected static function _dirToStruct($sPath, $maxinst, $aktinst = 0, $silent = false)
              {
                  $struct = ['dirs' => [], 'files' => []];
                  if (false === ($dir = @opendir($sPath))) {
                      if (!$silent) {
          Severity: Minor
          Found in class/pear/System.php - About 1 hr to fix

            Method rotate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function rotate($angle, $options = null)
                {
                    if (!($angle == $this->_rotation_angle($angle))) {
                        // No rotation needed
                        return true;
            Severity: Minor
            Found in class/pear/Image/Transform/Driver/NetPBM.php - About 1 hr to fix

              Method PclTarDelete has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')
                  {
                      TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
                      $v_result = 1;
              
              
              Severity: Minor
              Found in class/pcltar.lib.php - About 1 hr to fix

                Method PclTarExtractList has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function PclTarExtractList($p_tarname, $p_filelist, $p_path = './', $p_remove_path = '', $p_mode = '')
                    {
                        TrFctStart(__FILE__, __LINE__, 'PclTarExtractList', "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
                        $v_result = 1;
                
                
                Severity: Minor
                Found in class/pcltar.lib.php - About 1 hr to fix

                  Method PclTarUpdate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
                      {
                          TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
                          $v_result = 1;
                  
                  
                  Severity: Minor
                  Found in class/pcltar.lib.php - About 1 hr to fix

                    Method getMax has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getMax(\CriteriaElement $criteria = null, $max = '*')
                        {
                            $field   = '';
                            $groupby = false;
                            if (\is_object($criteria) && \is_subclass_of($criteria, \CriteriaElement::class)) {
                    Severity: Minor
                    Found in class/PersistableObjectHandler.php - About 1 hr to fix

                      Method render has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function render()
                          {
                              $ele_name = $this->getName();
                              echo '<table class="outer"><tr><td class="odd"><table><tr>';
                              $cols = 1;
                      Severity: Minor
                      Found in class/GroupFormCheckBox.php - About 1 hr to fix

                        Method getSum has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getSum(\CriteriaElement $criteria = null, $sum = '*')
                            {
                                $field   = '';
                                $groupby = false;
                                if (\is_object($criteria) && \is_subclass_of($criteria, \CriteriaElement::class)) {
                        Severity: Minor
                        Found in class/PersistableObjectHandler.php - About 1 hr to fix

                          Function checkWpFooter has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private function checkWpFooter()
                              {
                                  $current_theme = wp_get_theme();
                                  $theme_name    = $current_theme->Template;
                          
                          
                          Severity: Minor
                          Found in assets/js/ml-slider/inc/metaslider.systemcheck.class.php - About 1 hr 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 convertorderbytrans has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function convertorderbytrans($SortbyOrderby)
                          {
                              $orderbyTrans = [];
                              if ('photo_date DESC' === $SortbyOrderby) {
                                  $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
                          Severity: Minor
                          Found in public-album.php - About 1 hr 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 ajax_create_slide has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function ajax_create_slide()
                              {
                                  // security check
                                  if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'metaslider_addslide')) {
                                      echo "<tr><td colspan='2'>" . __('Security check failed. Refresh page and try again.', 'metaslider') . '</td></tr>';
                          Severity: Minor
                          Found in assets/js/ml-slider/inc/slide/metaslide.image.class.php - About 1 hr 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 convertorderbytrans has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                          function convertorderbytrans($SortbyOrderby)
                          {
                              $orderbyTrans = [];
                              if ('photo_date DESC' === $SortbyOrderby) {
                                  $orderbyTrans = _MD_EXTGALLERY_ORDERBY_DATEASC;
                          Severity: Minor
                          Found in public-useralbum.php - About 1 hr 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 tmpdir has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public static function tmpdir()
                              {
                                  if (OS_WINDOWS) {
                                      if ($var = $_ENV['TMP'] ?? getenv('TMP')) {
                                          return $var;
                          Severity: Minor
                          Found in class/pear/System.php - About 1 hr 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 getSum has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function getSum(\CriteriaElement $criteria = null, $sum = '*')
                              {
                                  $field   = '';
                                  $groupby = false;
                                  if (\is_object($criteria) && \is_subclass_of($criteria, \CriteriaElement::class)) {
                          Severity: Minor
                          Found in class/PersistableObjectHandler.php - About 1 hr 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 _makeWatermark has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function _makeWatermark($imageTransform)
                              {
                                  if (!\function_exists('imagettfbbox')) {
                                      return;
                                  }
                          Severity: Minor
                          Found in class/PhotoHandler.php - About 1 hr 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 getMax has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function getMax(\CriteriaElement $criteria = null, $max = '*')
                              {
                                  $field   = '';
                                  $groupby = false;
                                  if (\is_object($criteria) && \is_subclass_of($criteria, \CriteriaElement::class)) {
                          Severity: Minor
                          Found in class/PersistableObjectHandler.php - About 1 hr 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

                          Severity
                          Category
                          Status
                          Source
                          Language