77% subscribe-to-double-opt-in-comments

Code Review | Subscribe to Double-Opt-In Comments

WordPress plugin Subscribe to Double-Opt-In Comments scored77%from 54 tests.

About plugin

  • Plugin page: subscribe-to-doub...
  • Plugin version: 6.6.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2009
  • Latest release: Jun 24, 2021
  • Number of updates: 266
  • Update frequency: every 16.9 days
  • Top authors: Tobiask (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /148,426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.27MB] [CPU: ▲1.36ms] Passed 4 tests

Analyzing server-side resources used by Subscribe to Double-Opt-In Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2745.49 ▲3.75
Dashboard /wp-admin3.58 ▲0.2847.73 ▲0.50
Posts /wp-admin/edit.php3.69 ▲0.3455.04 ▲7.30
Add New Post /wp-admin/post-new.php6.16 ▲0.2785.85 ▼6.11
Media Library /wp-admin/upload.php3.50 ▲0.2738.31 ▲7.57
Subscribe to DOI Comments /wp-admin/options-general.php?page=stc-options3.4435.41
Subscriptions /wp-admin/tools.php?page=stc-management3.4434.36

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
sg_subscribe_settings
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subscribe to Double-Opt-In Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.54 ▼0.841.69 ▼0.2344.21 ▲1.27
Dashboard /wp-admin2,214 ▲295.83 ▼0.0598.03 ▼8.2539.18 ▼3.96
Posts /wp-admin/edit.php2,100 ▲112.03 ▼0.0033.47 ▼9.3933.78 ▼2.53
Add New Post /wp-admin/post-new.php1,546 ▲1018.63 ▼4.44626.67 ▲41.4761.57 ▲7.45
Media Library /wp-admin/upload.php1,402 ▲114.17 ▼0.0894.24 ▼5.2741.53 ▼5.96
Subscribe to DOI Comments /wp-admin/options-general.php?page=stc-options9512.0321.9429.11
Subscriptions /wp-admin/tools.php?page=stc-management7111.536.9517.45

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 were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=stc-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method sg_subscribe_settings::options_page() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=stc-options
    • > Deprecated in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+311
    Non-static method sg_subscribe_settings::options_page_contents() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stc-options
    • > Deprecated in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+264
    Non-static method sg_subscribe_settings::form_setting() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stc-options
    • > Deprecated in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+280
    Non-static method sg_subscribe_settings::checkflag() should not be called statically
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=stc-options
    • > Deprecated in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+268
    Non-static method sg_subscribe_settings::textarea_setting() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=stc-options
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+301
    Undefined index: withoutCom_text
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1230
    Undefined index: userSubscribeWithoutComment
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1234
    Undefined index: verify
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1235
    Undefined index: pid
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1236
    Undefined index: cm
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1237
    Undefined index: withoutCommentToken
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1238
    Undefined index: comment_withoutCommentToken_b984edcdfe562d3f512e5f50c1f1a1ed
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > User deprecated in wp-includes/functions.php+5453
    Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1404
    Undefined index: email
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=stc-management
    • > Notice in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php+1441
    Undefined index: showallsubscribers

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php:15

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 87% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Part of the settings menu.), #2 (The checkbox to subscribe to a comment thread.)
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

subscribe-to-double-opt-in-comments/subscribe-to-double-opt-in-comments.php 85% from 13 tests

The entry point to "Subscribe to Double-Opt-In Comments" version 6.6.12 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 313 characters long)
  • Domain Path: The domain path folder was not found ("/languages")

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
Everything looks great! No dangerous files found in this plugin1,338 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1285771,338

PHP code Passed 2 tests

An short overview of 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.38
Average class complexity70.50
▷ Minimum class complexity6.00
▷ Maximum class complexity135.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions952.94%
▷ Anonymous functions847.06%
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