93% acf-typography-field

Code Review | Advanced Custom Fields: Typography Field

WordPress plugin Advanced Custom Fields: Typography Field scored 93% from 54 tests.

About plugin

  • Plugin page: acf-typography-field
  • Plugin version: 3.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.9
  • WordPress version: 5.9.2
  • First release: Oct 17, 2016
  • Latest release: Feb 3, 2022
  • Number of updates: 25
  • Update frequency: every 77.3 days
  • Top authors: mujahid158 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

5,000+ active / 16,765 total downloads

Benchmarks

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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼298.49ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields: Typography Field
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▼0.0157.90 ▼11.04
Dashboard /wp-admin3.46 ▲0.0539.86 ▼2.65
Posts /wp-admin/edit.php3.69 ▲0.0541.70 ▼0.14
Add New Post /wp-admin/post-new.php6.93 ▼0.05102.66 ▼1,180.12
Media Library /wp-admin/upload.php3.34 ▲0.0433.76 ▲5.71
ACF Typography Settings /wp-admin/options-general.php?page=acf-typography-field3.3125.13

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Typography Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,186 ▼53616.07 ▲0.460.37 ▼5.2732.92 ▲30.63
Dashboard /wp-admin2,897 ▲396.12 ▼0.05117.58 ▼16.52151.03 ▼12.06
Posts /wp-admin/edit.php2,696 ▲23.24 ▼0.0063.09 ▼2.47144.08 ▲1.79
Add New Post /wp-admin/post-new.php1,714 ▲5320.41 ▲4.17405.80 ▼4.41168.29 ▲13.91
Media Library /wp-admin/upload.php1,700 ▲25.53 ▲0.02149.26 ▲13.73184.38 ▲1.24
ACF Typography Settings /wp-admin/options-general.php?page=acf-typography-field9942.3953.31113.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-typography-field/includes/functions.php:79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-typography-field/includes/admin_settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/acf-typography-field/includes/api-template.php:143

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Typography Field Settings), #2 (Typography Field Content Editing), #3 (Google Key Field required for Google Fonts)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

acf-typography-field/acf-typography.php 92% from 13 tests

"Advanced Custom Fields: Typography Field" version 3.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-typography-field.php" instead of "acf-typography.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,128 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP64066301,083
JavaScript125045

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity23.33
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.18MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png9.69KB3.79KB▼ 60.88%
screenshot-1.png135.36KB38.52KB▼ 71.54%
screenshot-2.png37.34KB9.93KB▼ 73.40%