An active PHP session was detected

Getting “An active PHP session was detected” critical warning in the site health section. This was caused by the Frontend Checklist plugin.

Change something similar to

if ( !session_id() ) {
    session_start();
}

to close the session like this:

	//load session for pdf-checklist
		if (!session_id()) session_start( [
        'read_and_close' => true,
    ] );

adding “ 'read_and_close' => true,” in the empty parentheses. This also got rid of another issue which I can’t even remember now!