84% thank-me-later

Code Review | Thank Me Later

WordPress plugin Thank Me Later scored 84% from 54 tests.

About plugin

  • Plugin page: thank-me-later
  • Plugin version: 3.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.4.2
  • WordPress version: 5.9.2
  • First release: Sep 4, 2008
  • Latest release: May 18, 2016
  • Number of updates: 130
  • Update frequency: every 21.6 days
  • Top authors: bbosh (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

2,000+ active / 175,088 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.25MB] [CPU: ▼318.85ms] Passed 4 tests

Analyzing server-side resources used by Thank Me Later
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.2961.04 ▲6.88
Dashboard /wp-admin3.66 ▲0.2586.13 ▲44.48
Posts /wp-admin/edit.php3.88 ▲0.2442.86 ▲0.27
Add New Post /wp-admin/post-new.php7.19 ▲0.2299.18 ▼1,305.00
Media Library /wp-admin/upload.php3.60 ▲0.3153.15 ▲22.44
Messages /wp-admin/admin.php?page=bbpp_thankmelater3.6637.21
Install /wp-admin/admin.php?page=bbpp_thankmelater_install3.5225.17
Stats /wp-admin/admin.php?page=bbpp_thankmelater_statistics3.5949.93
Opt out /wp-admin/admin.php?page=bbpp_thankmelater_opt_out3.5730.89

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 86 new files
Database: 4 new tables, 4 new options
New tables
wp_bbpp_thankmelater_messages
wp_bbpp_thankmelater_opens
wp_bbpp_thankmelater_opt_outs
wp_bbpp_thankmelater_schedules
New WordPress options
bbpp_thankmelater_show_install_screen
bbpp_thankmelater_version
bbpp_thankmelater_last_legacy_tick
bbpp_thankmelater_opt_out_level

Browser metrics Passed 4 tests

A check of browser resources used by Thank Me Later
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲9715.78 ▲0.196.10 ▼0.032.29 ▼0.37
Dashboard /wp-admin2,948 ▲876.13 ▼0.05115.02 ▼20.26156.30 ▼5.94
Posts /wp-admin/edit.php2,738 ▲503.24 ▲0.0165.77 ▼1.79200.36 ▲56.00
Add New Post /wp-admin/post-new.php1,796 ▲9617.18 ▼4.59430.11 ▲20.77157.71 ▼29.64
Media Library /wp-admin/upload.php1,756 ▲585.54 ▼0.02134.22 ▼3.87184.43 ▼52.71
Messages /wp-admin/admin.php?page=bbpp_thankmelater1,3372.7855.62149.47
Install /wp-admin/admin.php?page=bbpp_thankmelater_install1,0802.4053.96114.55
Stats /wp-admin/admin.php?page=bbpp_thankmelater_statistics1,4233.3668.18154.95
Opt out /wp-admin/admin.php?page=bbpp_thankmelater_opt_out1,2632.5661.65114.70

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 were found after uninstall: 1 option
    • bbpp_thankmelater_show_install_screen

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 35× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/thank-me-later/admin/messages/MessageListTable.php on line 4
    • > PHP Warning
      Use of undefined constant BBPP_THANKMELATER_PLUGIN_PATH - assumed 'BBPP_THANKMELATER_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/thank-me-later/shortcodes/t_part.php on line 4
    • > PHP Warning
      Use of undefined constant BBPP_THANKMELATER_PLUGIN_PATH - assumed 'BBPP_THANKMELATER_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/thank-me-later/Shortcoder.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/thank-me-later/admin/messages/shortcode_reference.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Bbpp_ThankMeLater_Shortcoder' not found in wp-content/plugins/thank-me-later/shortcodes/comment_url.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Bbpp_ThankMeLater_Shortcoder' not found in wp-content/plugins/thank-me-later/shortcodes/email.php:22
    • > PHP Warning
      require_once(BBPP_THANKMELATER_PLUGIN_PATHlib/instyle/instyle.php): failed to open stream: No such file or directory in wp-content/plugins/thank-me-later/TemplateHelper.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Bbpp_ThankMeLater_Shortcoder' not found in wp-content/plugins/thank-me-later/shortcodes/name.php:21
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/thank-me-later/admin/messages/MessageListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Bbpp_ThankMeLater_Shortcoder' not found in wp-content/plugins/thank-me-later/shortcodes/user_agent.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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
5 plugin tags: comments, social, newsletter, comment, email

thank-me-later/thankmelater.php 85% from 13 tests

"Thank Me Later" version 3.3.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("thank-me-later.php" instead of "thankmelater.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
Good job! No executable or dangerous file extensions detected10,483 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
PHP621,1241,6045,191
PO File71,0081,2202,640
JavaScript34623492,370
CSS1291282

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.33
Average class complexity21.60
▷ Minimum class complexity2.00
▷ Maximum class complexity119.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods262
▷ Static methods103.82%
▷ Public methods22184.35%
▷ Protected methods166.11%
▷ Private methods259.54%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.00%
▷ Class constants00.00%
▷ Public constants00.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 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
imgs/thank-you-banner.png5.13KB2.33KB▼ 54.61%