84% no-chinese-comments

Code Review | No Chinese Comments

WordPress plugin No Chinese Comments scored84%from 54 tests.

About plugin

  • Plugin page: no-chinese-comments
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 14, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 11
  • Update frequency: every 1.8 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /906 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.02MB] [CPU: ▼5.56ms] Passed 4 tests

Analyzing server-side resources used by No Chinese Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.56 ▲0.09
Dashboard /wp-admin3.33 ▲0.0350.36 ▼3.84
Posts /wp-admin/edit.php3.38 ▲0.0354.77 ▲3.13
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.56 ▼18.36
Media Library /wp-admin/upload.php3.25 ▲0.0235.90 ▼0.14
No Chinese Comments /wp-admin/options-general.php?page=no-chinese-comments-options3.2232.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
no_chinese_comments_mode
db_upgraded
no_chinese_comments_notice
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for No Chinese Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.63 ▼0.101.92 ▲0.1240.40 ▼1.31
Dashboard /wp-admin2,202 ▲225.62 ▼0.0291.99 ▼0.3841.33 ▼3.51
Posts /wp-admin/edit.php2,104 ▲42.16 ▲0.1439.76 ▲1.7238.00 ▲4.68
Add New Post /wp-admin/post-new.php1,531 ▲322.96 ▲0.02633.67 ▼14.1265.05 ▲6.78
Media Library /wp-admin/upload.php1,407 ▲104.21 ▲0.01100.66 ▼9.2143.60 ▼1.54
No Chinese Comments /wp-admin/options-general.php?page=no-chinese-comments-options8332.0325.1940.01

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/no-chinese-comments/no-chinese-comments.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/no-chinese-comments/options.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: comments, no spam

no-chinese-comments/no-chinese-comments.php Passed 13 tests

The primary PHP file in "No Chinese Comments" version 1.0.4 is used by WordPress to initiate all plugin functionality
79 characters long description:
Disallow Chinese Comments in Your Blog. 在你的部落格中禁止中文評論

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
Good job! No executable or dangerous file extensions detected156 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2162586
PO File2181870

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin