84% custom-typekit-fonts

Code Review | Custom Adobe Fonts (Typekit)

WordPress plugin Custom Adobe Fonts (Typekit) scored 84% from 54 tests.

About plugin

  • Plugin page: custom-typekit-fonts
  • Plugin version: 1.0.18
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2017
  • Latest release: Aug 21, 2023
  • Number of updates: 36
  • Update frequency: every 60.9 days
  • Top authors: Nikschavan (52.78%)brainstormworg (44.44%)patilvikasj (8.33%)

Code review

54 tests

User reviews

6 reviews

Install metrics

90,000+ active / 586,842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼1.31ms] Passed 4 tests

A check of server-side resources used by Custom Adobe Fonts (Typekit)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2235.32 ▼9.26
Dashboard /wp-admin3.60 ▲0.3045.71 ▼5.11
Posts /wp-admin/edit.php3.65 ▲0.2949.78 ▲4.08
Add New Post /wp-admin/post-new.php6.14 ▲0.2594.05 ▲5.05
Media Library /wp-admin/upload.php3.46 ▲0.2337.33 ▲5.09
Adobe Fonts /wp-admin/themes.php?page=custom-typekit-fonts3.4534.94

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 8 new options
New WordPress options
custom-typekit-fonts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
_custom_typekit_fonts_version
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Custom Adobe Fonts (Typekit)
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.181.63 ▼0.6137.94 ▼14.86
Dashboard /wp-admin2,210 ▲224.86 ▼0.07110.16 ▼4.0343.73 ▼4.57
Posts /wp-admin/edit.php2,090 ▲12.05 ▼0.0040.71 ▲4.8134.34 ▼1.17
Add New Post /wp-admin/post-new.php1,523 ▲923.18 ▲5.34607.13 ▼54.3552.00 ▲0.30
Media Library /wp-admin/upload.php1,389 ▼24.23 ▲0.04101.17 ▲2.9340.63 ▼5.67
Adobe Fonts /wp-admin/themes.php?page=custom-typekit-fonts8741.9638.9324.26

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 were found after uninstall: 8 options
    • can_compress_scripts
    • custom-typekit-fonts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • _custom_typekit_fonts_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 6× 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/custom-typekit-fonts/templates/custom-typekit-fonts-options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/custom-typekit-fonts/classes/class-custom-typekit-fonts-update.php:46
    • > PHP Warning
      Use of undefined constant CUSTOM_TYPEKIT_FONTS_DIR - assumed 'CUSTOM_TYPEKIT_FONTS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-typekit-fonts/classes/class-custom-typekit-fonts.php on line 39
    • > PHP Warning
      require_once(CUSTOM_TYPEKIT_FONTS_DIRclasses/class-custom-typekit-fonts-admin.php): failed to open stream: No such file or directory in wp-content/plugins/custom-typekit-fonts/classes/class-custom-typekit-fonts.php on line 39
    • > PHP Fatal error
      require_once(): Failed opening required 'CUSTOM_TYPEKIT_FONTS_DIRclasses/class-custom-typekit-fonts-admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/custom-typekit-fonts/classes/class-custom-typekit-fonts.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-typekit-fonts/classes/class-typekit-fonts-white-label.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: unlimited typekit custom fonts, theme custom fonts, custom adobe fonts

custom-typekit-fonts/custom-typekit-fonts.php Passed 13 tests

The entry point to "Custom Adobe Fonts (Typekit)" version 1.0.18 is a PHP file that has certain tags in its header comment area
77 characters long description:
Custom Adobe Fonts allows you to extends the fonts supports from the Typekit.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,395 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP123668411,209
CSS519193
JavaScript2254290
JSON1103

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity19.56
▷ Minimum class complexity7.00
▷ Maximum class complexity46.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods84
▷ Static methods1619.05%
▷ Public methods6476.19%
▷ Protected methods00.00%
▷ Private methods2023.81%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected