79% fontier

Code Review | Fontier -Font Preview Plugin for Easy Digital Downloads

WordPress plugin Fontier -Font Preview Plugin for Easy Digital Downloads scored79%from 54 tests.

About plugin

  • Plugin page: fontier
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 26, 2021
  • Latest release: Nov 30, 2022
  • Number of updates: 12
  • Update frequency: every 43.5 days
  • Top authors: teconce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /7,820 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲1.45MB] [CPU: ▲13.48ms] Passed 4 tests

A check of server-side resources used by Fontier -Font Preview Plugin for Easy Digital Downloads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.93 ▲1.4751.86 ▲14.51
Dashboard /wp-admin4.75 ▲1.4560.41 ▲9.10
Posts /wp-admin/edit.php4.80 ▲1.4564.08 ▲19.55
Add New Post /wp-admin/post-new.php7.35 ▲1.4794.83 ▲10.74
Media Library /wp-admin/upload.php4.67 ▲1.4559.45 ▲23.44
Fontier Options /wp-admin/options-general.php?page=fontier_options4.6845.87

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 1,082 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
fontier_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Fontier -Font Preview Plugin for Easy Digital Downloads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.17 ▼0.421.58 ▼0.0237.43 ▼3.09
Dashboard /wp-admin2,212 ▲375.57 ▼0.1282.82 ▼30.8537.57 ▼5.39
Posts /wp-admin/edit.php2,117 ▲142.02 ▼0.0138.51 ▲0.5334.50 ▼2.45
Add New Post /wp-admin/post-new.php1,536 ▲1023.39 ▲0.39727.40 ▲9.3955.23 ▼6.81
Media Library /wp-admin/upload.php1,417 ▲174.20 ▲0.0495.70 ▼4.8641.03 ▼2.54
Fontier Options /wp-admin/options-general.php?page=fontier_options1,2053.7252.9041.40

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • fontier_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/fontier/tags/1.0.0/admin/partials/fontier-admin-display.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CSF_Fields' not found in wp-content/plugins/fontier/tags/1.0.2/admin/partials/fontier-custom-csf.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CSF_Fields' not found in wp-content/plugins/fontier/admin/partials/fontier-custom-csf.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CSF_Fields' not found in wp-content/plugins/fontier/tags/1.0.3/admin/partials/fontier-custom-csf.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CSF_Fields' not found in wp-content/plugins/fontier/tags/1.0.2/public/partials/fontier-custom-csf.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fontier/tags/1.0.0/public/partials/fontier-public-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fontier/public/partials/fontier-public-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fontier/tags/1.0.2/public/partials/fontier-public-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fontier/tags/1.0.3/public/partials/fontier-public-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fontier/trunk/public/partials/fontier-public-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/fontier/tags/1.0.1/public/partials/fontier-public-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: elementor addon, addons, wordpress page builder, elementor, elements...

fontier/fontier.php Passed 13 tests

The main PHP script in "Fontier -Font Preview Plugin for Easy Digital Downloads" version 1.0.4 is automatically included on every request by WordPress
55 characters long description:
Fontier is a auto font preview genration plugin for EDD

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin62,518 lines of code in 216 files:
LanguageFilesBlank linesComment linesLines of code
PHP1476,3043,63027,867
JavaScript122,56087110,552
CSS126178289,514
Sass221,43338,069
PO File213,1983,5916,514
SVG2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity23.04
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity6.40
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes418
▷ Abstract classes122.87%
▷ Concrete classes40697.13%
▷ Final classes00.00%
Methods1,707
▷ Static methods26015.23%
▷ Public methods1,66897.72%
▷ Protected methods90.53%
▷ Private methods301.76%
Functions156
▷ Named functions156100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
8 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/vendors/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
tags/1.0.3/admin/vendors/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
tags/1.0.2/admin/vendors/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/icon-128x128.png12.86KB3.98KB▼ 69.05%
assets/icon-256x256.png26.00KB7.68KB▼ 70.45%