94% acf-google-font-selector-field

Code Review | ACF: Google Font Selector

WordPress plugin ACF: Google Font Selector scored 94% from 54 tests.

About plugin

  • Plugin page: acf-google-font-s...
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2
  • WordPress version: 5.9.2
  • First release: Feb 4, 2014
  • Latest release: Apr 28, 2015
  • Number of updates: 20
  • Update frequency: every 22.4 days
  • Top authors: danielpataki (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

5,000+ active / 15,619 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼334.26ms] Passed 4 tests

A check of server-side resources used by ACF: Google Font Selector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0654.28 ▲3.15
Dashboard /wp-admin3.46 ▲0.0632.38 ▼1.41
Posts /wp-admin/edit.php3.70 ▲0.0635.85 ▼0.33
Add New Post /wp-admin/post-new.php6.93 ▼0.0491.21 ▼1,316.72
Media Library /wp-admin/upload.php3.35 ▲0.0525.99 ▼18.56
Google Font Selector /wp-admin/options-general.php?page=acfgfs-settings3.3222.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ACF: Google Font Selector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲9715.88 ▲0.215.84 ▲0.092.20 ▼0.34
Dashboard /wp-admin2,915 ▲576.12 ▼0.07120.36 ▼18.29157.48 ▼5.00
Posts /wp-admin/edit.php2,714 ▲263.23 ▲0.0164.51 ▼0.66142.68 ▲2.01
Add New Post /wp-admin/post-new.php1,793 ▲13222.16 ▲6.32443.93 ▲10.63157.89 ▼2.42
Media Library /wp-admin/upload.php1,721 ▲275.48 ▼0.06146.33 ▲0.71190.09 ▼16.10
Google Font Selector /wp-admin/options-general.php?page=acfgfs-settings1,0242.3955.60112.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-google-font-selector-field/acf-google_font_selector-v5.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-google-font-selector-field/acf-google_font_selector-v4.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-google-font-selector-field/acf-google_font_selector.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: google, acf, fonts

acf-google-font-selector-field/acf-google_font_selector.php 92% from 13 tests

This is the main PHP file of "ACF: Google Font Selector" version 3.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("acf-google-font-selector-field.php" instead of "acf-google_font_selector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin686 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PO File22844100

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions19100.00%
▷ Anonymous functions00.00%
▷ 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
No PNG files were detected