78% custom-font-uploader

Code Review | Wbcom Designs - Custom Font Uploader

WordPress plugin Wbcom Designs - Custom Font Uploader scored78%from 54 tests.

About plugin

  • Plugin page: custom-font-uploader
  • Plugin version: 2.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2017
  • Latest release: Oct 13, 2023
  • Number of updates: 20
  • Update frequency: every 115.6 days
  • Top authors: wbcomdesigns (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

5,000+ active /51,231 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼4.64ms] Passed 4 tests

A check of server-side resources used by Wbcom Designs - Custom Font Uploader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1839.56 ▼0.27
Dashboard /wp-admin3.49 ▲0.1446.58 ▼13.94
Posts /wp-admin/edit.php3.60 ▲0.2450.66 ▲6.39
Add New Post /wp-admin/post-new.php6.09 ▲0.2083.03 ▼1.53
Media Library /wp-admin/upload.php3.41 ▲0.1835.57 ▼2.82
General /wp-admin/admin.php?page=wbcomplugins3.3833.67
Font Uploader /wp-admin/admin.php?page=custom-font-uploader-settings3.3832.51
Support /wp-admin/admin.php?page=wbcom-support-page3.3730.23
Our Themes /wp-admin/admin.php?page=wbcom-themes-page3.3532.88
Our Plugins /wp-admin/admin.php?page=wbcom-plugins-page3.5631.24

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 67 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Wbcom Designs - Custom Font Uploader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲9914.39 ▲0.172.08 ▲0.4340.96 ▼4.22
Dashboard /wp-admin2,245 ▲785.66 ▼0.0582.51 ▼26.6537.99 ▼4.60
Posts /wp-admin/edit.php2,146 ▲462.04 ▲0.0438.55 ▲1.1935.06 ▼1.18
Add New Post /wp-admin/post-new.php1,566 ▼11423.03 ▲0.83657.24 ▼5.9665.47 ▲9.38
Media Library /wp-admin/upload.php1,444 ▲414.28 ▲0.1197.93 ▼3.4640.14 ▼4.28
General /wp-admin/admin.php?page=wbcomplugins1,0092.0425.9744.56
Font Uploader /wp-admin/admin.php?page=custom-font-uploader-settings1,0171.8226.4539.16
Support /wp-admin/admin.php?page=wbcom-support-page9532.0523.4634.92
Our Themes /wp-admin/admin.php?page=wbcom-themes-page7992.0324.8023.32
Our Plugins /wp-admin/admin.php?page=wbcom-plugins-page1,9632.0425.6373.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=wbcom-themes-page
    • > Warning in wp-content/plugins/custom-font-uploader/admin/wbcom/wbcom-admin-settings.php+220
    include(templates/wbcom-themes-page.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=wbcom-themes-page
    • > Warning in wp-content/plugins/custom-font-uploader/admin/wbcom/wbcom-admin-settings.php+220
    include(): Failed opening 'templates/wbcom-themes-page.php' for inclusion (include_path='.:/usr/share/php')

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/custom-font-uploader/admin/wbcom/templates/wbcom-support-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/custom-font-uploader/admin/wbcom/templates/wbcom-license-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/custom-font-uploader/admin/class-cfup-admin-feedback.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-font-uploader/inc/cfup-functions.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/custom-font-uploader/admin/cfup-customfont-settings.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/custom-font-uploader/admin/wbcom/templates/wbcom-plugins-page.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The screenshot shows the setting page for custom font and uploaded some example fonts with delete option and corresponds to screenshot-2.(png|jpg|jpeg|gif).), #2 (The screenshot shows the setting page for google fonts with preview option and some example font listing and corresponds to screenshot-3.(png|jpg|jpeg|gif).), #3 (Enabling Specific Google Font), #4 (Uploading additional custom fonts), #5 (How to use enabled fonts using inspect element, you can add the same inside custom css.)
You can look at the official readme.txt

custom-font-uploader/custom-font-uploader.php 85% from 13 tests

The principal PHP file in "Wbcom Designs - Custom Font Uploader" v. 2.3.4 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)

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
No dangerous file extensions were detected12,692 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JSON3105,224
JavaScript45964223,445
CSS3426642,235
PHP141784711,788

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity17.75
▷ Minimum class complexity11.00
▷ Maximum class complexity24.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/css/select2.png0.60KB0.99KB0.00%
admin/wbcom/assets/imgs/wbcom-offer-notice.png67.64KB32.40KB▼ 52.11%
screenshot-2.png47.60KB25.72KB▼ 45.97%
screenshot-1.png30.69KB16.70KB▼ 45.58%
admin/assets/images/custom_font_uploder.png30.14KB7.64KB▼ 74.66%