84% tinymce-chinese-convert

Code Review | TinyMCE Chinese Convert

WordPress plugin TinyMCE Chinese Convert scored84%from 54 tests.

About plugin

  • Plugin page: tinymce-chinese-c...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 21, 2014
  • Latest release: Jul 29, 2021
  • Number of updates: 43
  • Update frequency: every 63.9 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /3,492 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
Installer ran successfully

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

A check of server-side resources used by TinyMCE Chinese Convert
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.39 ▼26.50
Dashboard /wp-admin3.32 ▲0.0150.27 ▼2.76
Posts /wp-admin/edit.php3.37 ▲0.0148.88 ▼2.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.06 ▼21.91
Media Library /wp-admin/upload.php3.24 ▲0.0143.60 ▲4.87

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for TinyMCE Chinese Convert
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.74 ▲0.451.85 ▼0.6941.51 ▼6.26
Dashboard /wp-admin2,195 ▲185.59 ▼0.0886.99 ▼24.4643.91 ▼12.10
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0138.71 ▲1.8634.43 ▲0.54
Add New Post /wp-admin/post-new.php1,686 ▲15822.01 ▼0.97634.81 ▲12.4552.33 ▼1.60
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.06107.66 ▼4.3343.33 ▼5.52

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/tinymce-chinese-convert/tinymce-chinese-convert.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: post, chinese, tinymce

tinymce-chinese-convert/tinymce-chinese-convert.php Passed 13 tests

The primary PHP file in "TinyMCE Chinese Convert" version 1.2.6 is used by WordPress to initiate all plugin functionality
81 characters long description:
一鍵在部落格「文章編輯」頁面將你的文章轉換為簡體或繁體

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin160 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript652119
PHP1172141

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/convert_simplified.png4.35KB1.02KB▼ 76.54%
img/convert_traditional.png4.85KB1.24KB▼ 74.54%