84% comment-filtering

Code Review | Comment Filtering

WordPress plugin Comment Filtering scored84%from 54 tests.

About plugin

  • Plugin page: comment-filtering
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 19, 2016
  • Latest release: Mar 24, 2016
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: tempranova (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /654 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.38ms] Passed 4 tests

A check of server-side resources used by Comment Filtering
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.81 ▼9.71
Dashboard /wp-admin3.32 ▲0.0145.53 ▼6.22
Posts /wp-admin/edit.php3.37 ▲0.0149.12 ▼3.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.72 ▼13.31
Media Library /wp-admin/upload.php3.24 ▲0.0135.89 ▼4.28

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

Browser metrics Passed 4 tests

Checking browser requirements for Comment Filtering
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.93 ▼0.659.26 ▲7.3138.02 ▼6.19
Dashboard /wp-admin2,206 ▲214.82 ▼1.0098.66 ▼10.8641.15 ▼5.17
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0041.29 ▲4.2935.12 ▼2.52
Add New Post /wp-admin/post-new.php1,533 ▲1423.29 ▲0.10669.39 ▲4.3667.13 ▲3.49
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.0297.91 ▼18.0243.94 ▼6.14

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined index: end_date in wp-content/plugins/comment-filtering/ajax_comment_filter.php on line 24
    • > PHP Notice
      Undefined index: start_date in wp-content/plugins/comment-filtering/ajax_comment_filter.php on line 23
    • > PHP Notice
      Undefined index: selected_range in wp-content/plugins/comment-filtering/ajax_comment_filter.php on line 25
    • > PHP Notice
      Undefined index: search_term in wp-content/plugins/comment-filtering/ajax_comment_filter.php on line 22
    • > PHP Notice
      Undefined index: reset in wp-content/plugins/comment-filtering/ajax_comment_filter.php on line 26
    • > PHP Notice
      Undefined index: post_id in wp-content/plugins/comment-filtering/ajax_comment_filter.php on line 21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (This shows what the search and filter interface looks like (Please note, Bootstrap is required)) image required
You can look at the official readme.txt

comment-filtering/comment-filtering.php Passed 13 tests

The primary PHP file in "Comment Filtering" version 1.0.0 is used by WordPress to initiate all plugin functionality
102 characters long description:
Allow users to search comments by terms and filter by time periods. Makes use of Bootstrap Timepicker.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin287 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP42496232
JavaScript262146
CSS20109

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png49.87KB15.40KB▼ 69.13%