84% easy-google-fonts

Code Review | Easy Google Fonts

WordPress plugin Easy Google Fonts scored84%from 54 tests.

About plugin

  • Plugin page: easy-google-fonts
  • Plugin version: 2.0.4
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Jul 23, 2021
  • Number of updates: 88
  • Update frequency: every 31.8 days
  • Top authors: sunny_johal (100%)

Code review

54 tests

User reviews

216 reviews

Install metrics

200,000+ active /3,281,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.05ms] Passed 4 tests

An overview of server-side resources used by Easy Google Fonts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.20 ▼7.15
Dashboard /wp-admin3.37 ▲0.0746.68 ▼2.27
Posts /wp-admin/edit.php3.43 ▲0.0746.07 ▼5.71
Add New Post /wp-admin/post-new.php6.04 ▲0.1693.82 ▼9.05
Media Library /wp-admin/upload.php3.30 ▲0.0735.26 ▲3.36
Easy Google Fonts /wp-admin/options-general.php?page=easy-google-fonts3.2933.43

Server storage [IO: ▲2.10MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 87 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
egf_version
db_upgraded
egf_show_admin_pointer
egf_force_user_redirect
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Google Fonts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10713.31 ▼1.101.69 ▼0.4041.20 ▼0.03
Dashboard /wp-admin2,263 ▲724.97 ▼0.96111.44 ▲12.9841.29 ▼5.47
Posts /wp-admin/edit.php2,151 ▲622.50 ▲0.4942.18 ▼0.0635.89 ▼0.37
Add New Post /wp-admin/post-new.php1,543 ▲918.24 ▼5.06587.59 ▼15.2958.44 ▲6.44
Media Library /wp-admin/upload.php1,447 ▲564.45 ▲0.25102.17 ▲1.3641.48 ▼3.13
Easy Google Fonts /wp-admin/options-general.php?page=easy-google-fonts1,0948.99188.3836.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EGF\\Data\\add_action() in wp-content/plugins/easy-google-fonts/src/includes/data.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EGF\\Api\\add_action() in wp-content/plugins/easy-google-fonts/src/includes/api.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EGF\\Settings\\add_action() in wp-content/plugins/easy-google-fonts/src/includes/settings.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EGF\\Customizer\\add_action() in wp-content/plugins/easy-google-fonts/src/includes/customizer.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EGF\\Admin\\add_action() in wp-content/plugins/easy-google-fonts/src/includes/admin.php:42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EGF\\Deprecated\\add_filter() in wp-content/plugins/easy-google-fonts/src/includes/deprecated.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function EGF\\Frontend\\add_action() in wp-content/plugins/easy-google-fonts/src/includes/frontend.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 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
10 plugin tags: webfonts, google fonts wordpress, theme fonts, wordpress webfonts, typography...

easy-google-fonts/easy-google-fonts.php Passed 13 tests

The primary PHP file in "Easy Google Fonts" version 2.0.4 is used by WordPress to initiate all plugin functionality
66 characters long description:
A simple and easy way to add google fonts to your WordPress theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected31,355 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
JSON10016,295
CSS5701608,565
JavaScript625954634,953
PHP162476211,524
SVG10018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions87
▷ Named functions5967.82%
▷ Anonymous functions2832.18%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.23MB with 0.16MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/images/main-pic.png230.83KB67.89KB▼ 70.59%