84% embed-google-fonts

Code Review | Embed Google Fonts

WordPress plugin Embed Google Fonts scored84%from 54 tests.

About plugin

  • Plugin page: embed-google-fonts
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2018
  • Latest release: Dec 5, 2022
  • Number of updates: 23
  • Update frequency: every 71.1 days
  • Top authors: Adrian2k7 (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

8,000+ active /36,540 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.90ms] Passed 4 tests

An overview of server-side resources used by Embed Google Fonts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0631.17 ▼12.07
Dashboard /wp-admin3.32 ▲0.0252.55 ▲0.57
Posts /wp-admin/edit.php3.37 ▲0.0246.36 ▼1.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.92 ▼9.30
Media Library /wp-admin/upload.php3.25 ▲0.0235.44 ▼0.83

Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • The plugin illegally modified 152 files (24,255.64KB) outside of "wp-content/plugins/embed-google-fonts/" and "wp-content/uploads/"
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100.ttf
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100italic.ttf
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100.svg
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100.woff2
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100italic.svg
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/_font.css
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100.eot
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100.woff
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100italic.woff
    • (new file) wp-content/cache/embed-google-fonts/noto-serif/noto-serif-v22-cyrillic_cyrillic-ext_greek_greek-ext_latin_latin-ext_vietnamese-100italic.eot
    • ...
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Embed Google Fonts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,783 ▲2214.72 ▲0.362.07 ▼0.0745.22 ▼3.39
Dashboard /wp-admin2,195 ▲215.58 ▲0.0397.22 ▼7.5447.62 ▲1.47
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0337.31 ▲0.8836.45 ▼2.63
Add New Post /wp-admin/post-new.php1,553 ▲2718.17 ▼5.03649.27 ▼2.0173.36 ▲21.21
Media Library /wp-admin/upload.php1,397 ▼34.30 ▲0.16104.81 ▼0.2046.17 ▼2.42

Uninstaller [IO: ▲23.69MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-google-fonts/includes/class.embed-google-fonts-proxy.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: gdpr, google fonts, embed

embed-google-fonts/embed-google-fonts.php 92% from 13 tests

This is the main PHP file of "Embed Google Fonts" version 3.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.9" instead of "6.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin286 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35628286

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.50
▷ Minimum class complexity6.00
▷ Maximum class complexity37.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin