68% clear-comments

Code Review | Clear comments

WordPress plugin Clear comments scored68%from 54 tests.

About plugin

  • Plugin page: clear-comments
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.6
  • WordPress version: 6.3.1
  • First release: Jan 23, 2021
  • Latest release: Feb 9, 2021
  • Number of updates: 9
  • Update frequency: every 2.0 days
  • Top authors: brahmnan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /433 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.57ms] Passed 4 tests

A check of server-side resources used by Clear comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.22 ▲3.02
Dashboard /wp-admin3.36 ▲0.0247.73 ▼8.49
Posts /wp-admin/edit.php3.48 ▲0.1240.57 ▼7.34
Add New Post /wp-admin/post-new.php5.95 ▲0.0678.16 ▼18.01
Media Library /wp-admin/upload.php3.29 ▲0.0636.51 ▼0.44
Clear comments /wp-admin/options-general.php?page=clear_comments_options3.2329.05

Server storage [IO: ▲0.03MB] [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: 1 new table, 6 new options
New tables
wp_clear_comments_log
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Clear comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.35 ▼0.291.99 ▲0.3644.07 ▲3.33
Dashboard /wp-admin2,201 ▲245.61 ▼0.0382.04 ▼7.2837.56 ▼1.33
Posts /wp-admin/edit.php2,103 ▲62.01 ▼0.0132.93 ▼2.5534.08 ▼0.18
Add New Post /wp-admin/post-new.php1,533 ▲422.99 ▼0.18662.90 ▲3.0953.27 ▲1.47
Media Library /wp-admin/upload.php1,400 ▲94.21 ▲0.0397.14 ▼6.6644.11 ▼2.31
Clear comments /wp-admin/options-general.php?page=clear_comments_options7812.0223.0832.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_clear_comments_log
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=clear_comments_options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method EPV_ClearComments_Admin::plugin_overview() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=clear_comments_options
    • > Deprecated in wp-content/plugins/clear-comments/includes/overview.php+6
    Non-static method EPV_ClearComments::get_clear_count() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/clear-comments/includes/overview.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/clear-comments/includes/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/clear-comments/includes/test.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: comments

clear-comments/clear-comments.php Passed 13 tests

The main PHP file in "Clear comments" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
65 characters long description:
This plugin replaces words from the stop list with asterisks ****

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected502 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP610520423
PO File1222461
CSS13418

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity23.50
▷ Minimum class complexity23.00
▷ Maximum class complexity24.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1986.36%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin