10% comment-redlist

Code Review | Comment Redlist

WordPress plugin Comment Redlist scored10%from 54 tests.

About plugin

  • Plugin page: comment-redlist
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 14, 2013
  • Latest release: Mar 11, 2018
  • Number of updates: 25
  • Update frequency: every 72.9 days
  • Top authors: skunkbad (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /3,511 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/comment-redlist/comment-redlist.php+386
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.81MB] [CPU: ▼54.24ms] Passed 4 tests

An overview of server-side resources used by Comment Redlist
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.285.49 ▼38.06
Dashboard /wp-admin2.20 ▼1.106.70 ▼49.26
Posts /wp-admin/edit.php2.20 ▼1.166.60 ▼40.61
Add New Post /wp-admin/post-new.php2.20 ▼3.697.11 ▼89.01
Media Library /wp-admin/upload.php2.20 ▼1.036.72 ▼29.35
Comment Redlist /wp-admin/options-general.php?page=comment_redlist2.207.65

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
comment_redlist
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Comment Redlist: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.51 ▲0.211.86 ▲0.1842.17 ▲4.80
Dashboard /wp-admin2,210 ▲225.85 ▲0.9795.70 ▼21.3538.88 ▼5.38
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0035.69 ▼1.7130.70 ▼3.23
Add New Post /wp-admin/post-new.php1,536 ▲223.27 ▲0.09657.97 ▼23.9056.42 ▲2.91
Media Library /wp-admin/upload.php1,395 ▲74.21 ▼0.0297.13 ▼16.9942.88 ▼2.50
Comment Redlist /wp-admin/options-general.php?page=comment_redlist1,1332.1724.1733.82

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/comment-redlist/comment-redlist.php+386
    Undefined index: ip_addrs
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=comment_redlist
    • > Notice in wp-content/plugins/comment-redlist/inc/dedicated-options-page.php+31
    Undefined index: ip_addrs
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=comment_redlist
    • > Notice in wp-content/plugins/comment-redlist/inc/dedicated-options-page.php+17
    Undefined index: sequences

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
Almost there! Just fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/comment-redlist/comment-redlist.php:64
    • > PHP Notice
      Undefined variable: js_sequences in wp-content/plugins/comment-redlist/inc/jquery-redlist.php on line 14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/comment-redlist/inc/dedicated-options-page.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/comment-redlist/inc/jquery-redlist.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/comment-redlist/inc/lang.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/comment-redlist/inc/settings-discussion-field.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: comments, red, list, redlist, spam...

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

The primary PHP file in "Comment Redlist" version 1.0.9 is used by WordPress to initiate all plugin functionality
105 characters long description:
Blocks spam, identified by your specified character sequences, instead of inserting it into the database.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,002 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5147209799
PO File15155195
HTML1008

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.86
Average class complexity77.00
▷ Minimum class complexity77.00
▷ Maximum class complexity77.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
PNG images were not found in this plugin