78% comment-spam-wiper

Code Review | Comment SPAM Wiper

WordPress plugin Comment SPAM Wiper scored78%from 54 tests.

About plugin

  • Plugin page: comment-spam-wiper
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 6.3.1
  • First release: Feb 10, 2012
  • Latest release: Aug 24, 2012
  • Number of updates: 54
  • Update frequency: every 3.7 days
  • Top authors: intermod (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /11,004 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
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▲131.41ms] Passed 4 tests

Server-side resources used by Comment SPAM Wiper
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.01 ▼0.77
Dashboard /wp-admin3.50 ▲0.19985.47 ▲932.40
Posts /wp-admin/edit.php3.53 ▲0.18180.36 ▲123.68
Add New Post /wp-admin/post-new.php6.00 ▲0.12370.04 ▲260.15
Media Library /wp-admin/upload.php3.34 ▲0.12180.55 ▲142.56
/wp-admin/admin.php?page=comment-spam-wiper/admin.php3.39214.83
Settings /wp-admin/admin.php?page=csw_settings_page3.31294.78
Statistics /wp-admin/admin.php?page=csw_stats_page3.28205.18
Dashboard /wp-admin/admin.php?page=csw_main_page3.39208.32

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Comment SPAM Wiper
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲12814.65 ▲0.271.80 ▼0.3941.41 ▼1.74
Dashboard /wp-admin2,263 ▲755.88 ▲1.0097.50 ▼8.5377.42 ▲32.69
Posts /wp-admin/edit.php2,122 ▲302.01 ▲0.0036.47 ▼6.0937.57 ▲5.44
Add New Post /wp-admin/post-new.php1,694 ▲17421.91 ▼1.20710.40 ▲16.7352.32 ▼0.07
Media Library /wp-admin/upload.php1,424 ▲364.22 ▼0.0298.65 ▼7.5466.19 ▲20.71
/wp-admin/admin.php?page=comment-spam-wiper/admin.php7982.2027.2826.05
Settings /wp-admin/admin.php?page=csw_settings_page8142.0427.7126.50
Statistics /wp-admin/admin.php?page=csw_stats_page8161.8624.8524.05
Dashboard /wp-admin/admin.php?page=csw_main_page7952.0627.4528.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=csw_main_page
    • > Notice in wp-content/plugins/comment-spam-wiper/admin.php+34
    Undefined variable: rss_items
    • > GET request to /wp-admin/admin.php?page=csw_stats_page
    • > Warning in wp-content/plugins/comment-spam-wiper/admin.php+106
    file_get_contents(http://www.spamwipe.com/exip.php): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/comment-spam-wiper/admin.php:123
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/comment-spam-wiper/csw.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: spam, block, comments, blog, comment...

comment-spam-wiper/csw.php 92% from 13 tests

"Comment SPAM Wiper" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("comment-spam-wiper.php" instead of "csw.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin601 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP412787601

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions27
▷ Named functions27100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
icon.png0.84KB0.78KB▼ 6.64%