84% wp-yomigana

Code Review | WP-Yomigana

WordPress plugin WP-Yomigana scored84%from 54 tests.

About plugin

  • Plugin page: wp-yomigana
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Jan 26, 2012
  • Latest release: Mar 16, 2020
  • Number of updates: 34
  • Update frequency: every 87.4 days
  • Top authors: Takahashi_Fumiki (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /11,713 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
Install script ran successfully

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

Analyzing server-side resources used by WP-Yomigana
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1835.28 ▲0.34
Dashboard /wp-admin3.47 ▲0.1745.38 ▼2.37
Posts /wp-admin/edit.php3.58 ▲0.2347.18 ▼1.19
Add New Post /wp-admin/post-new.php6.07 ▲0.1981.40 ▼17.42
Media Library /wp-admin/upload.php3.39 ▲0.1633.94 ▼2.25
Ruby Setting /wp-admin/options-general.php?page=ruby-options3.3730.99

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 88 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP-Yomigana
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.19 ▼1.191.70 ▼0.0142.99 ▲2.11
Dashboard /wp-admin2,209 ▲185.82 ▲0.90103.48 ▼4.9639.28 ▼4.65
Posts /wp-admin/edit.php2,095 ▲62.04 ▲0.0335.97 ▼3.2832.61 ▲0.43
Add New Post /wp-admin/post-new.php6,214 ▲4,70019.37 ▲1.97937.24 ▲265.9338.42 ▼12.85
Media Library /wp-admin/upload.php1,394 ▲64.19 ▼0.0294.72 ▼9.7344.10 ▼1.26
Ruby Setting /wp-admin/options-general.php?page=ruby-options1,1342.0524.18138.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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\Yomigana\\Pattern\\Singleton' not found in wp-content/plugins/wp-yomigana/src/Hametuha/Yomigana/Pattern/Application.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-yomigana/templates/setting.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\Yomigana\\Pattern\\Application' not found in wp-content/plugins/wp-yomigana/src/Hametuha/Yomigana/Admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-yomigana/templates/ruby.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\Yomigana\\Pattern\\Application' not found in wp-content/plugins/wp-yomigana/src/Hametuha/Yomigana/Gutenberg.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-yomigana/templates/q.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Hametuha\\Yomigana\\Pattern\\Application' not found in wp-content/plugins/wp-yomigana/src/Hametuha/Yomigana/Bootstrap.php:12

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
10 plugin tags: ruby, dl, tinymce, small, cite...

wp-yomigana/wp-yomigana.php Passed 13 tests

The main PHP script in "WP-Yomigana" version 2.1.0 is automatically included on every request by WordPress
40 characters long description:
You can enter ruby tag in visual editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected14,737 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
JSON50013,128
PHP17149401772
JavaScript93971355
JSX8658242
PO File1394394
Markdown142073
Sass317068
CSS5485

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.38
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods51
▷ Static methods47.84%
▷ Public methods4078.43%
▷ Protected methods815.69%
▷ Private methods35.88%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
21 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/dist/q-2.png0.48KB0.46KB▼ 4.85%
assets/img/dist/cite-2.png0.43KB0.35KB▼ 19.37%
assets/images/ui-icons_0074a2_256x240.png4.20KB4.17KB▼ 0.70%
assets/img/src/small-2.png1.62KB0.47KB▼ 71.08%
assets/img/dist/ruby.png0.32KB0.54KB0.00%