Skip to content

Closes #7243: Preload fonts frontend (PR #7312)

Codacy Production / Codacy Static Code Analysis required action Feb 22, 2025 in 0s

6 new issues (1 max.) of at least minor severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 6
           

Complexity increasing per file
==============================
- inc/Engine/Media/PreloadFonts/Frontend/Controller.php  6
- inc/Engine/Media/PreloadFonts/Factory.php  1
- inc/Engine/Media/PreloadFonts/Frontend/Subscriber.php  1
- inc/Engine/Media/PreloadFonts/AJAX/Controller.php  10
- inc/Engine/Media/PreloadFonts/Context/Context.php  2
- inc/Engine/Media/PreloadFonts/Database/Queries/PreloadFonts.php  2
- inc/Engine/Media/PreloadFonts/ServiceProvider.php  1
- inc/Engine/Media/PreloadFonts/Database/Rows/PreloadFonts.php  4
         

Complexity decreasing per file
==============================
+ inc/Engine/Optimization/LazyRenderContent/Database/Queries/LazyRenderContent.php  -1
+ inc/Engine/Media/AboveTheFold/Database/Queries/AboveTheFold.php  -1
         

Clones added
============
- inc/Engine/Media/PreloadFonts/Factory.php  1
- inc/Engine/Media/PreloadFonts/Database/Schema/PreloadFonts.php  1
- inc/Engine/Media/AboveTheFold/Factory.php  1
         

See the complete overview on Codacy

Annotations

Check warning on line 37 in inc/Engine/Media/Fonts/Admin/Settings.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

inc/Engine/Media/Fonts/Admin/Settings.php#L37

Avoid unused local variables such as '$intput'.

Check warning on line 46 in inc/Engine/Media/PreloadFonts/AJAX/Controller.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

inc/Engine/Media/PreloadFonts/AJAX/Controller.php#L46

The method add_data() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.

Check warning on line 46 in inc/Engine/Media/PreloadFonts/AJAX/Controller.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

inc/Engine/Media/PreloadFonts/AJAX/Controller.php#L46

The method add_data() has an NPath complexity of 512. The configured NPath complexity threshold is 200.

Check warning on line 32 in inc/Engine/Media/PreloadFonts/Context/Context.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

inc/Engine/Media/PreloadFonts/Context/Context.php#L32

Avoid unused parameters such as '$data'.

Check warning on line 154 in inc/Engine/Media/PreloadFonts/Frontend/Controller.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

inc/Engine/Media/PreloadFonts/Frontend/Controller.php#L154

The method add_preload_fonts_in_head() has a Cyclomatic Complexity of 10. The configured cyclomatic complexity threshold is 10.

Check warning on line 100 in inc/Plugin.php

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

inc/Plugin.php#L100

Avoid unused private fields such as '$options_api'.