awsmug/torro-forms

View on GitHub
src/torro-forms.php

Summary

Maintainability
D
2 days
Test Coverage

File torro-forms.php has 419 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Plugin main class
 *
 * @package TorroForms
Severity: Minor
Found in src/torro-forms.php - About 6 hrs to fix

    Method instantiate_db_object_managers has 98 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        protected function instantiate_db_object_managers() {
            $this->forms = $this->instantiate_plugin_service(
                'DB_Objects\Forms\Form_Manager',
                $this->prefix,
                array(
    Severity: Major
    Found in src/torro-forms.php - About 3 hrs to fix

      Torro_Forms has 24 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Torro_Forms extends Leaves_And_Love_Plugin {
      
          /**
           * The forms manager instance.
           *
      Severity: Minor
      Found in src/torro-forms.php - About 2 hrs to fix

        Method instantiate_core_services has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            protected function instantiate_core_services() {
                call_user_func( array( 'Leaves_And_Love\Plugin_Lib\Fields\Field_Manager', 'set_translations' ), $this->instantiate_plugin_class( 'Translations\Translations_Field_Manager' ) );
        
                $this->error_handler = $this->instantiate_plugin_service( 'Error_Handler', $this->prefix, $this->instantiate_plugin_class( 'Translations\Translations_Error_Handler' ) );
        
        
        Severity: Minor
        Found in src/torro-forms.php - About 1 hr to fix

          Method instantiate_component_services has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function instantiate_component_services() {
                  $this->admin_pages = $this->instantiate_library_service(
                      'Components\Admin_Pages',
                      $this->prefix,
                      array(
          Severity: Minor
          Found in src/torro-forms.php - About 1 hr to fix

            Avoid too many return statements within this method.
            Open

                        return false;
            Severity: Major
            Found in src/torro-forms.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return true;
              Severity: Major
              Found in src/torro-forms.php - About 30 mins to fix

                There are no issues that match your filters.

                Category
                Status