wecobble/Subtitles

View on GitHub
admin/class-subtitles-admin.php

Summary

Maintainability
A
3 hrs
Test Coverage

Showing 2 of 2 total issues

Method update_subtitle_data has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

public function update_subtitle_data( $post_id, $post, $update ) {
/**
* Check current save status of post
*/
$is_post_autosave = (bool) wp_is_post_autosave( $post_id ); // Autosave, found in wp-includes/revisison.php
Severity: Minor
Found in admin/class-subtitles-admin.php - About 1 hr to fix

    Function update_subtitle_data has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
    Open

    public function update_subtitle_data( $post_id, $post, $update ) {
    /**
    * Check current save status of post
    */
    $is_post_autosave = (bool) wp_is_post_autosave( $post_id ); // Autosave, found in wp-includes/revisison.php
    Severity: Minor
    Found in admin/class-subtitles-admin.php - About 1 hr to fix
    Category
    Status