78% japanese-font-for-tinymce

Code Review | Japanese font for WordPress(Previously: Japanese Font for TinyMCE)

WordPress plugin Japanese font for WordPress(Previously: Japanese Font for TinyMCE) scored78%from 54 tests.

About plugin

  • Plugin page: japanese-font-for...
  • Plugin version: 4.28
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2017
  • Latest release: Sep 19, 2023
  • Number of updates: 137
  • Update frequency: every 17.6 days
  • Top authors: raspi0124 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10,000+ active /106,776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼11.24ms] Passed 4 tests

An overview of server-side resources used by Japanese font for WordPress(Previously: Japanese Font for TinyMCE)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0348.62 ▲12.01
Dashboard /wp-admin3.32 ▼0.0348.26 ▼10.38
Posts /wp-admin/edit.php3.37 ▲0.0145.25 ▼17.16
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.00 ▼21.40
Media Library /wp-admin/upload.php3.24 ▲0.0138.73 ▲3.97

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Japanese font for WordPress(Previously: Japanese Font for TinyMCE)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9914.35 ▲0.091.89 ▲0.0942.03 ▲0.76
Dashboard /wp-admin2,246 ▲695.52 ▼0.0084.41 ▼1.19100.84 ▲60.81
Posts /wp-admin/edit.php2,148 ▲512.10 ▲0.1534.47 ▼2.4460.47 ▲23.23
Add New Post /wp-admin/post-new.php1,734 ▲20822.48 ▼1.20739.17 ▲73.4462.09 ▼15.40
Media Library /wp-admin/upload.php1,439 ▲394.21 ▼0.0595.65 ▼14.47101.41 ▲52.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/japanese-font-for-tinymce/default-font-css.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/japanese-font-for-tinymce/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/japanese-font-for-tinymce/japanese-tinymce.php:57
    • > PHP Notice
      Undefined index: fn in wp-content/plugins/japanese-font-for-tinymce/default-font-css.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/japanese-font-for-tinymce/notice.php:7

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: gutenberg, japanesefont, fonts, tinymce, font...

japanese-font-for-tinymce/japanese-tinymce.php 92% from 13 tests

The entry point to "Japanese font for WordPress(Previously: Japanese Font for TinyMCE)" version 4.28 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("japanese-font-for-tinymce.php" instead of "japanese-tinymce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected16,593 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
JSON20015,760
PHP661130447
CSS666161
JavaScript42136137
Sass39057
Markdown210031

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions26
▷ Named functions2492.31%
▷ Anonymous functions27.69%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png1.19KB1.02KB▼ 14.75%