84% no-japanese-comments

Code Review | No Japanese Comments

WordPress plugin No Japanese Comments scored84%from 54 tests.

About plugin

  • Plugin page: no-japanese-comments
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 6, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 17
  • Update frequency: every 1.6 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,014 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.92ms] Passed 4 tests

This is a short check of server-side resources used by No Japanese Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.67 ▼2.85
Dashboard /wp-admin3.33 ▲0.0344.81 ▲0.94
Posts /wp-admin/edit.php3.38 ▲0.0250.35 ▲4.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.13 ▼23.03
Media Library /wp-admin/upload.php3.26 ▲0.0235.48 ▲1.27
No Japanese Comments /wp-admin/options-general.php?page=no-japanese-comments-options3.2231.88

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
no_japanese_comments_notice
theysaidso_admin_options
no_japanese_comments_mode

Browser metrics Passed 4 tests

No Japanese Comments: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.75 ▲0.461.89 ▲0.1940.22 ▲0.85
Dashboard /wp-admin2,210 ▲215.84 ▲0.88107.11 ▼6.7237.32 ▼7.43
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0235.85 ▼1.2335.19 ▲3.52
Add New Post /wp-admin/post-new.php1,517 ▼217.58 ▼5.86662.71 ▼10.3546.32 ▼7.82
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0393.53 ▼7.0141.49 ▼2.07
No Japanese Comments /wp-admin/options-general.php?page=no-japanese-comments-options8222.0323.4239.30

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-posts
    • no_japanese_comments_mode
    • theysaidso_admin_options
    • no_japanese_comments_notice
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/no-japanese-comments/options.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/no-japanese-comments/no-japanese-comments.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 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
2 plugin tags: comments, no spam

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

The main file in "No Japanese Comments" v. 1.0.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
89 characters long description:
Disallow Japanese Language Comments in Your Blog. 在你的部落格中禁止日文評論

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin155 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2162585
PO File2467470

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin