gocodebox/lifterlms

View on GitHub
includes/abstracts/abstract.llms.admin.table.php

Summary

Maintainability
D
2 days
Test Coverage
F
55%

LLMS_Admin_Table has 44 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class LLMS_Admin_Table extends LLMS_Abstract_Exportable_Admin_Table {

    /**
     * Unique ID for the Table.
     *
Severity: Minor
Found in includes/abstracts/abstract.llms.admin.table.php - About 6 hrs to fix

    File abstract.llms.admin.table.php has 345 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Admin Table Abstract
     *
     * @package LifterLMS/Abstracts/Classes
    Severity: Minor
    Found in includes/abstracts/abstract.llms.admin.table.php - About 4 hrs to fix

      Function get_tfoot_html has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

          public function get_tfoot_html() {
              ob_start();
              ?>
              <tfoot>
                  <tr>
      Severity: Minor
      Found in includes/abstracts/abstract.llms.admin.table.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

      Method get_tfoot_html has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function get_tfoot_html() {
              ob_start();
              ?>
              <tfoot>
                  <tr>
      Severity: Minor
      Found in includes/abstracts/abstract.llms.admin.table.php - About 1 hr to fix

        Method get_table_html has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function get_table_html() {
        
                $classes = $this->get_table_classes();
        
                ob_start();
        Severity: Minor
        Found in includes/abstracts/abstract.llms.admin.table.php - About 1 hr to fix

          Function get_thead_html has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function get_thead_html() {
                  ob_start();
                  ?>
                  <thead>
                      <tr>
          Severity: Minor
          Found in includes/abstracts/abstract.llms.admin.table.php - About 55 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_table_filters_html has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function get_table_filters_html() {
                  ob_start();
                  ?>
                  <div class="llms-table-filters">
                      <?php foreach ( $this->get_columns() as $id => $data ) : ?>
          Severity: Minor
          Found in includes/abstracts/abstract.llms.admin.table.php - About 35 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_columns has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public function get_columns( $context = 'display' ) {
          
                  /**
                   * Filters the array of table columns.
                   *
          Severity: Minor
          Found in includes/abstracts/abstract.llms.admin.table.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

          There are no issues that match your filters.

          Category
          Status