82% fontmeister

Code Review | FontMeister - The Font Management Plugin

WordPress plugin FontMeister - The Font Management Plugin scored 82% from 54 tests.

About plugin

  • Plugin page: fontmeister
  • Plugin version: 1.08
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.1
  • WordPress version: 5.9.2
  • First release: May 8, 2012
  • Latest release: Feb 18, 2019
  • Number of updates: 22
  • Update frequency: every 112.6 days
  • Top authors: sayontan (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active / 36,211 total downloads

Benchmarks

Plugin footprint 99% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼292.51ms] 50% from 4 tests

This is a short check of server-side resources used by FontMeister - The Font Management Plugin
It is recommended to improve the following
  • RAM: The total memory usage must be kept under 10MB (currently 10.18MB on /wp-admin/admin.php?page=fontmeister)
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,904.43ms on /wp-admin/admin.php?page=fontmeister)
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.2856.31 ▲6.27
Dashboard /wp-admin3.64 ▲0.2434.80 ▲1.66
Posts /wp-admin/edit.php3.87 ▲0.2338.07 ▼3.69
Add New Post /wp-admin/post-new.php7.11 ▲0.1495.78 ▼1,170.96
Media Library /wp-admin/upload.php3.52 ▲0.2327.22 ▲2.95
Font Sources /wp-admin/admin.php?page=fontmeister-settings3.5024.70
Fonts /wp-admin/admin.php?page=fontmeister10.181,904.43

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

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

Browser metrics 75% from 4 tests

FontMeister - The Font Management Plugin: an overview of browser usage
Having an awesome user experience is important, so please improve the following
  • Nodes: Limit the number of DOM nodes under 25,000 (currently 49,281 on /wp-admin/admin.php?page=fontmeister)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,814 ▲6016.10 ▲0.416.10 ▼0.802.18 ▼0.16
Dashboard /wp-admin2,925 ▲646.22 ▲0.04117.92 ▼14.81172.31 ▲11.82
Posts /wp-admin/edit.php2,691 ▲193.13 ▼0.1163.58 ▼3.39137.35 ▼3.64
Add New Post /wp-admin/post-new.php1,690 ▲2918.48 ▲2.97386.99 ▼28.26181.27 ▲27.71
Media Library /wp-admin/upload.php1,731 ▲335.68 ▲0.15135.29 ▼13.99213.96 ▲25.01
Font Sources /wp-admin/admin.php?page=fontmeister-settings1,1603.1058.00130.92
Fonts /wp-admin/admin.php?page=fontmeister49,2814.46230.58150.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=fontmeister
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+66
    fopen(wp-content/uploads/fontmeister/fontmeister.css): failed to open stream: No such file or directory

SRP 0% 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 return non-empty strings:
    • > /wp-content/plugins/fontmeister/previewer.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fontmeister/fontmeister.php:24

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (A menu is created for FontMeister with 2 pages - one for setting up your sources and the other for picking the fonts.), #2 (Enter the details for the sources you want to pull fonts from.), #3 (See the list of fonts available from each source in the Fonts section.), #4 (Preview individual fonts. Vary the weights and the base font size to pick the right mix for your site.), #5 (Fine tune your selections by picking a smaller set of variants or subsets, and assign selectors to each font.)
You can look at the official readme.txt

fontmeister/fontmeister.php Passed 13 tests

Analyzing the main PHP file in "FontMeister - The Font Management Plugin" version 1.08
137 characters long description:
FontMeister lets you preview, add and use fonts from popular sources on the web. It supports Google Web Fonts, Typekit and Font Squirrel.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,972 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP31241421,294
JavaScript3294506
CSS2114153
JSON10019

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity248.00
▷ Minimum class complexity248.00
▷ Maximum class complexity248.00
Average method complexity8.72
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods3196.88%
▷ Protected methods00.00%
▷ Private methods13.12%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
10 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png30.18KB15.57KB▼ 48.41%
screenshot-1.png2.97KB2.29KB▼ 23.01%
include/icons/FontMeister-16.png0.62KB0.65KB0.00%
screenshot-2.png21.82KB11.79KB▼ 45.94%
include/icons/FontMeister-48.png2.77KB2.33KB▼ 15.74%