90% use-any-font

Code Review | Use Any Font | Custom Font Uploader

WordPress plugin Use Any Font | Custom Font Uploader scored90%from 54 tests.

About plugin

  • Plugin page: use-any-font
  • Plugin version: 6.3.04
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2012
  • Latest release: Oct 5, 2023
  • Number of updates: 118
  • Update frequency: every 33.6 days
  • Top authors: dnesscarkey (100%)

Code review

54 tests

User reviews

1082 reviews

Install metrics

200,000+ active /5,363,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▲0.62ms] Passed 4 tests

A check of server-side resources used by Use Any Font | Custom Font Uploader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2442.84 ▼1.00
Dashboard /wp-admin3.53 ▲0.2252.45 ▲2.50
Posts /wp-admin/edit.php3.64 ▲0.2849.19 ▼3.84
Add New Post /wp-admin/post-new.php6.13 ▲0.24106.36 ▲13.48
Media Library /wp-admin/upload.php3.45 ▲0.2240.96 ▲4.83

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 19 new options
New WordPress options
uaf_site_url
widget_theysaidso_widget
uaf_api_key
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
uaf_font_display_property
uaf_current_version
uaf_enable_multi_lang_support
uaf_hide_key
...

Browser metrics Passed 4 tests

Use Any Font | Custom Font Uploader: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲7014.49 ▲0.111.81 ▼0.4540.08 ▼18.36
Dashboard /wp-admin2,231 ▲524.94 ▼0.00108.18 ▼13.9438.78 ▼5.09
Posts /wp-admin/edit.php2,117 ▲252.03 ▲0.0342.57 ▲1.1437.39 ▲5.60
Add New Post /wp-admin/post-new.php1,536 ▲322.83 ▼0.47644.72 ▼19.1375.80 ▲15.66
Media Library /wp-admin/upload.php1,416 ▲254.21 ▲0.03103.04 ▼18.1244.12 ▼0.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 19 options
    • uaf_api_key
    • uaf_current_version
    • uaf_css_updated_timestamp
    • db_upgraded
    • uaf_hide_key
    • uaf_activated_url
    • widget_recent-comments
    • uaf_uploader_type
    • uaf_server_url_type
    • uaf_font_display_property
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Screenshot #6. Assign fonts to custom elements.) image missing
You can look at the official readme.txt

use-any-font/use-any-font.php Passed 13 tests

The main file in "Use Any Font | Custom Font Uploader" v. 6.3.04 serves as a complement to information provided in readme.txt and as the entry point to the plugin
30 characters long description:
Embed any font in your website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,909 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP18233861,753
JavaScript110296
CSS10060

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
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
Namespaces0
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%
Functions59
▷ Named functions5694.92%
▷ Anonymous functions35.08%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.36MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png12.75KB7.22KB▼ 43.35%
screenshot-3.png38.38KB15.09KB▼ 60.69%
screenshot-1.png36.23KB26.32KB▼ 27.34%
screenshot-6.png61.98KB19.17KB▼ 69.06%
screenshot-2.png198.36KB73.42KB▼ 62.99%