78% simplified-japanese

Code Review | Simplified Japanese

WordPress plugin Simplified Japanese scored78%from 54 tests.

About plugin

  • Plugin page: simplified-japanese
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 11, 2020
  • Latest release: May 12, 2022
  • Number of updates: 15
  • Update frequency: every 40.6 days
  • Top authors: alfasado (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Simplified Japanese
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2238.28 ▼5.01
Dashboard /wp-admin3.37 ▲0.0630.20 ▼17.71
Posts /wp-admin/edit.php3.45 ▲0.0935.65 ▼13.07
Add New Post /wp-admin/post-new.php5.45 ▼0.4462.37 ▼33.19
Media Library /wp-admin/upload.php3.40 ▲0.1634.40 ▲0.43
Simplified japanese /wp-admin/options-general.php?page=simplified_japanese3.3628.19

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simplified Japanese
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7214.48 ▲0.081.71 ▼0.1237.66 ▼12.72
Dashboard /wp-admin2,210 ▲225.81 ▼0.04104.10 ▼9.2839.28 ▼2.69
Posts /wp-admin/edit.php2,096 ▲42.05 ▲0.0240.90 ▼1.1535.70 ▲2.15
Add New Post /wp-admin/post-new.php1,685 ▲15122.08 ▼1.08666.95 ▼45.9647.02 ▼16.38
Media Library /wp-admin/upload.php1,398 ▲104.23 ▼0.0399.13 ▼6.6040.56 ▼5.87
Simplified japanese /wp-admin/options-general.php?page=simplified_japanese9302.1722.6629.88

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 were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=simplified_japanese
    • > Notice in wp-content/plugins/simplified-japanese/simplified-japanese.php+126
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simplified-japanese/class.tsutaeru-web.php
    • > /wp-content/plugins/simplified-japanese/simplified-japanese.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: gutenberg, classic editor, editor

simplified-japanese/simplified-japanese.php 92% from 13 tests

This is the main PHP file of "Simplified Japanese" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.4" instead of "5.6")

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
There were no executable files found in this plugin2,142 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1766671,028
PHP46039953
PO File16684148
JSON9009
SVG4004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity93.50
▷ Minimum class complexity83.00
▷ Maximum class complexity104.00
Average method complexity7.07
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1550.00%
▷ Public methods1860.00%
▷ Protected methods00.00%
▷ Private methods1240.00%
Functions14
▷ Named functions00.00%
▷ Anonymous functions14100.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
No PNG images were found in this plugin