84% no-english-comments

Code Review | No English Comments

WordPress plugin No English Comments scored84%from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,127 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by No English Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.91 ▲1.52
Dashboard /wp-admin3.33 ▲0.0350.10 ▼6.01
Posts /wp-admin/edit.php3.38 ▲0.0247.03 ▼7.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.64 ▼10.14
Media Library /wp-admin/upload.php3.25 ▲0.0240.11 ▲1.55
No English Comments /wp-admin/options-general.php?page=no-english-comments-options3.2236.47

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
theysaidso_admin_options
can_compress_scripts
db_upgraded
no_english_comments_notice
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
no_english_comments_mode

Browser metrics Passed 4 tests

Checking browser requirements for No English Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.112.29 ▲0.4545.85 ▲0.45
Dashboard /wp-admin2,196 ▲195.55 ▼0.1391.63 ▼8.0540.41 ▼10.79
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0235.73 ▼0.6533.74 ▼2.87
Add New Post /wp-admin/post-new.php1,529 ▲323.52 ▲0.48690.66 ▲27.0450.19 ▼13.83
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.03107.66 ▲2.7947.92 ▲1.74
No English Comments /wp-admin/options-general.php?page=no-english-comments-options8331.9926.3829.71

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • no_english_comments_mode
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • no_english_comments_notice

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 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-english-comments/no-english-comments.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/no-english-comments/options.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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-english-comments/no-english-comments.php Passed 13 tests

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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin154 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2162584
PO File2181870

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
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 are no PNG files in this plugin