84% filter-comments

Code Review | Filter Comments

WordPress plugin Filter Comments scored84%from 54 tests.

About plugin

  • Plugin page: filter-comments
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 19, 2019
  • Latest release: Jan 19, 2019
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: adnanafzal565 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /627 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Filter Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.04 ▼4.30
Dashboard /wp-admin3.35 ▲0.0446.10 ▲2.51
Posts /wp-admin/edit.php3.40 ▲0.0455.28 ▲5.84
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.18 ▼2.04
Media Library /wp-admin/upload.php3.27 ▲0.0433.58 ▼0.15
Filter Comments /wp-admin/options-general.php?page=plugin_filtercomments3.2429.02

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Filter Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲7913.27 ▼1.134.78 ▲2.6644.64 ▼2.95
Dashboard /wp-admin2,214 ▲325.86 ▼0.02103.43 ▼15.6538.91 ▼3.01
Posts /wp-admin/edit.php2,108 ▲192.09 ▲0.0839.50 ▼1.2937.25 ▲3.46
Add New Post /wp-admin/post-new.php1,526 ▼722.82 ▼0.27639.44 ▼140.2758.15 ▼6.31
Media Library /wp-admin/upload.php1,407 ▲194.28 ▲0.0896.46 ▼18.4544.53 ▼2.78
Filter Comments /wp-admin/options-general.php?page=plugin_filtercomments9472.0927.5027.40

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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)
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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/filter-comments/index.php:27

User-side errors Passed 1 test

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


Plugin configuration 96% from 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
8 plugin tags: remove, word, words, bad, comments...

filter-comments/index.php 92% from 13 tests

The main file in "Filter Comments" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("filter-comments.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin401 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions8100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG files were detected