gocodebox/lifterlms

View on GitHub
includes/models/model.llms.product.php

Summary

Maintainability
A
2 hrs
Test Coverage
C
79%

Method get_access_plans has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function get_access_plans( $free_only = false, $visible_only = true ) {

        $args = array(
            'meta_key'       => '_llms_product_id', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
            'meta_value'     => $this->get( 'id' ), // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
Severity: Minor
Found in includes/models/model.llms.product.php - About 1 hr to fix

    Method has_active_subscriptions has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function has_active_subscriptions( $use_cache = true ) {
    
            $found = false;
            if ( $use_cache ) {
                $subscriptions_count = wp_cache_get( $this->get( 'id' ), 'llms_product_subscriptions_count', true, $found );
    Severity: Minor
    Found in includes/models/model.llms.product.php - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status