wp-plugins/all-in-one-seo-pack

View on GitHub

Showing 427 of 427 total issues

Avoid too many return statements within this method.
Open

                            return $obj;
Severity: Major
Found in JSON.php - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                        return strtolower( $str );
    Severity: Major
    Found in aioseop_module_class.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                              return $this->substr( $file, $offset, $maxlen );
      Severity: Major
      Found in aioseop_module_class.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                            return $wpfs->get_contents( $filename );
        Severity: Major
        Found in aioseop_module_class.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                              return mb_strtoupper( $str, $charset );
          Severity: Major
          Found in aioseop_module_class.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                return strtoupper( $str );
            Severity: Major
            Found in aioseop_module_class.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                  return mb_strtolower( $str, $charset );
              Severity: Major
              Found in aioseop_module_class.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return $str;
                Severity: Major
                Found in aioseop_module_class.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return false;
                  Severity: Major
                  Found in aioseop_module_class.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                if ( $mod_enable ) return $this->do_load_module( $mod );
                    Severity: Major
                    Found in aioseop_module_manager.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return false;
                      Severity: Major
                      Found in aioseop_module_manager.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                        return $defaults[ $item ];
                        Severity: Major
                        Found in aioseop_sitemap.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return false;
                          Severity: Major
                          Found in aioseop_sitemap.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    if ( $this->options[ $field ] == 'sel' ) return false;
                            Severity: Major
                            Found in aioseop_sitemap.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              if ( $nodefaults ) return false;
                              Severity: Major
                              Found in aioseop_sitemap.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                                    return $cache[ $item . $type ];
                                Severity: Major
                                Found in aioseop_sitemap.php - About 30 mins to fix

                                  Function get_paged has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      function get_paged( $link ) {
                                          global $wp_rewrite;
                                          $page = $this->get_page_number();
                                          $page_name = 'page';
                                          if ( !empty( $wp_rewrite ) && !empty( $wp_rewrite->pagination_base ) ) $page_name = $wp_rewrite->pagination_base;
                                  Severity: Minor
                                  Found in aioseop_class.php - About 25 mins 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 apply_tax_title_format has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      function apply_tax_title_format( $category_name, $category_description, $tax = '' ) {
                                          if ( empty( $tax ) ) $tax = get_query_var( 'taxonomy' );
                                          $title_format = $this->get_tax_title_format( $tax );
                                          $title = str_replace( '%taxonomy_title%', $category_name, $title_format );
                                          if ( strpos( $title, '%taxonomy_description%' ) !== false ) $title = str_replace( '%taxonomy_description%', $category_description, $title );
                                  Severity: Minor
                                  Found in aioseop_class.php - About 25 mins 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 get_object_labels has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                          function get_object_labels( $post_objs ) {
                                              $pt = array_keys( $post_objs );
                                              $post_types = Array();
                                              foreach ( $pt as $p )
                                                  if ( !empty( $post_objs[$p]->label ) )
                                  Severity: Minor
                                  Found in aioseop_module_class.php - About 25 mins 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 get_all_images has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                          function get_all_images( $options = null, $p = null ) {
                                              $img = $this->get_all_images_by_type( $options, $p );
                                              $legacy = Array();
                                              foreach( $img as $k => $v ) {
                                                  if ( $v['type'] == 'featured' ) {
                                  Severity: Minor
                                  Found in aioseop_module_class.php - About 25 mins 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