68% wp-font-face

Code Review | WP font-face

WordPress plugin WP font-face scored68%from 54 tests.

About plugin

  • Plugin page: wp-font-face
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Dec 4, 2012
  • Latest release: Dec 22, 2013
  • Number of updates: 7
  • Update frequency: every 54.9 days
  • Top authors: opicron (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

500+ active /24,466 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.23MB] [CPU: ▼47.49ms] Passed 4 tests

This is a short check of server-side resources used by WP font-face
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7218.19 ▼26.25
Dashboard /wp-admin2.79 ▼0.5220.24 ▼35.19
Posts /wp-admin/edit.php2.79 ▼0.5722.21 ▼35.17
Add New Post /wp-admin/post-new.php2.79 ▼3.1019.35 ▼93.35
Media Library /wp-admin/upload.php2.79 ▼0.4423.73 ▼16.33
FontFace /wp-admin/options-general.php?page=wp-font-face/fontface.plugin.php2.7920.22

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 12 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP font-face
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.23 ▼0.542.00 ▲0.3747.73 ▲5.75
Dashboard /wp-admin2,202 ▲285.53 ▼0.1095.65 ▲5.3139.40 ▼6.19
Posts /wp-admin/edit.php2,113 ▲132.02 ▲0.0235.54 ▼1.5234.33 ▲2.56
Add New Post /wp-admin/post-new.php1,539 ▲1123.11 ▼0.03637.65 ▼98.1050.57 ▼7.05
Media Library /wp-admin/upload.php1,413 ▲134.23 ▼0.0396.31 ▼9.2644.90 ▼1.03
FontFace /wp-admin/options-general.php?page=wp-font-face/fontface.plugin.php8661.9922.4826.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wp-font-face/fontface.plugin.php+151
    Undefined variable: update_css
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-font-face/fontface.plugin.php
    • > Notice in wp-content/plugins/wp-font-face/fontface.plugin.php+164
    Undefined variable: update_css

SRP 50% from 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
Please fix the following
  • 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/wp-font-face/fontface.plugin.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: A description for screenshot #4 is missing in wp-font-face/assets to your readme.txt
Please take inspiration from this readme.txt

wp-font-face/fontface.plugin.php 92% from 13 tests

The main PHP script in "WP font-face" version 1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-font-face.php" instead of "fontface.plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,317 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
fonts/daniel/specimen_files/daniel-cleartype.png84.32KB53.00KB▼ 37.14%