83% ts-webfonts-for-onamaecom

Code Review | TypeSquare Webfonts for お名前.com

WordPress plugin TypeSquare Webfonts for お名前.com scored83%from 54 tests.

About plugin

  • Plugin page: ts-webfonts-for-o...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Apr 4, 2023
  • Number of updates: 22
  • Update frequency: every 100.1 days
  • Top authors: onamaecom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /87,001 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.76ms] Passed 4 tests

This is a short check of server-side resources used by TypeSquare Webfonts for お名前.com
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.74 ▼2.92
Dashboard /wp-admin3.33 ▲0.0348.32 ▼2.78
Posts /wp-admin/edit.php3.44 ▲0.0945.55 ▼1.67
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.57 ▼3.65
Media Library /wp-admin/upload.php3.25 ▲0.0233.31 ▲2.52

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

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

Browser metrics Passed 4 tests

TypeSquare Webfonts for お名前.com: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲20914.75 ▲0.4443.63 ▲41.8740.01 ▼11.41
Dashboard /wp-admin2,228 ▲435.82 ▼0.0496.66 ▼2.5642.36 ▲2.60
Posts /wp-admin/edit.php2,114 ▲282.06 ▲0.0134.01 ▼2.7136.45 ▲1.75
Add New Post /wp-admin/post-new.php1,533 ▲1923.30 ▲5.60666.99 ▼58.6656.46 ▼6.88
Media Library /wp-admin/upload.php1,413 ▲284.22 ▲0.04104.65 ▲5.3849.39 ▲4.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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 everything seems fine, this is not 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
Please take a closer look at the following
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.api.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.fonttheme.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.fonttheme.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'TypeSquare_Admin_Base' not found in wp-content/plugins/ts-webfonts-for-onamaecom/inc/admin-fonttheme.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.fonttheme.php on line 2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.api.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.fonttheme.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.fonttheme.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ts-webfonts-for-onamaecom/inc/admin-dashboard.php:16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/ts-webfonts-for-onamaecom/inc/class/class.fonttheme.php on line 2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: webfonts, fonts

ts-webfonts-for-onamaecom/ts-webfonts-for-onamae.php 77% from 13 tests

The main PHP file in "TypeSquare Webfonts for お名前.com" ver. 2.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ts-webfonts-for-onamaecom.php" instead of "ts-webfonts-for-onamae.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected3,902 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP11189611,726
CSS3158201,076
JavaScript29971551
JSX23813467
JSON20082

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.36
Average class complexity22.00
▷ Minimum class complexity2.00
▷ Maximum class complexity70.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods95
▷ Static methods1616.84%
▷ Public methods6871.58%
▷ Protected methods00.00%
▷ Private methods2728.42%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.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
There are no PNG files in this plugin