84% hamyar-comment-filter

Code Review | Comment Word Filrer

WordPress plugin Comment Word Filrer scored 84% from 54 tests.

About plugin

  • Plugin page: hamyar-comment-fi...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1-3.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2013
  • Latest release: Mar 10, 2013
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: phantom-wolf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 813 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Comment Word Filrer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.06 ▼3.47
Dashboard /wp-admin3.32 ▲0.0152.93 ▼2.65
Posts /wp-admin/edit.php3.37 ▲0.0153.42 ▲1.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.49 ▼3.75
Media Library /wp-admin/upload.php3.24 ▲0.0143.01 ▲5.38
Hamyar comment filter /wp-admin/options-general.php?page=Hamyar_Comment_filter3.2135.62

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 8 new options
New WordPress options
banned_words
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
replace_word

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comment Word Filrer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.29 ▼1.394.75 ▲3.1841.46 ▼3.78
Dashboard /wp-admin2,213 ▲74.84 ▼1.0096.63 ▼5.4439.52 ▲0.62
Posts /wp-admin/edit.php2,096 ▲72.00 ▲0.0340.93 ▲2.2435.58 ▲1.41
Add New Post /wp-admin/post-new.php1,536 ▲2223.25 ▲5.68733.29 ▲31.4555.16 ▲1.36
Media Library /wp-admin/upload.php1,389 ▲14.12 ▼0.06109.66 ▼5.8947.13 ▼1.37
Hamyar comment filter /wp-admin/options-general.php?page=Hamyar_Comment_filter7832.0229.6725.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • banned_words
    • theysaidso_admin_options
    • replace_word
    • can_compress_scripts
    • widget_recent-comments
    • 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 no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/hamyar-comment-filter/Hamyar_comment_filter.php:11

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 96% from 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
4 plugin tags: filter, comment, wordpress, word

hamyar-comment-filter/Hamyar_comment_filter.php 92% from 13 tests

"Comment Word Filrer" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hamyar-comment-filter.php" instead of "Hamyar_comment_filter.php")

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
No dangerous file extensions were detected43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121043

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin