84% let-them-unsubscribe

Code Review | Let Them Unsubscribe

WordPress plugin Let Them Unsubscribe scored84%from 54 tests.

About plugin

  • Plugin page: let-them-unsubscribe
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.6
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Jul 6, 2016
  • Number of updates: 32
  • Update frequency: every 41.6 days
  • Top authors: igmoweb (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /2,253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▲2.40ms] Passed 4 tests

A check of server-side resources used by Let Them Unsubscribe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0547.13 ▲7.45
Dashboard /wp-admin3.42 ▲0.1264.25 ▲10.68
Posts /wp-admin/edit.php3.53 ▲0.1851.50 ▲1.24
Add New Post /wp-admin/post-new.php6.00 ▲0.12102.05 ▼1.60
Media Library /wp-admin/upload.php3.34 ▲0.1238.58 ▲2.50
Let Them Unsubscribe /wp-admin/options-general.php?page=ltu_settings3.3235.07

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
iw_ltu_version
widget_ltu-widget
lt_unsubscribe_options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Let Them Unsubscribe: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.16 ▼0.131.91 ▲0.1244.65 ▲0.79
Dashboard /wp-admin2,202 ▲255.61 ▲0.0189.42 ▼6.8640.51 ▼6.29
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.0938.68 ▲0.6534.73 ▼2.22
Add New Post /wp-admin/post-new.php1,530 ▼123.10 ▼0.20627.10 ▼29.4357.50 ▲2.00
Media Library /wp-admin/upload.php1,404 ▲14.19 ▲0.0299.70 ▲0.1041.19 ▼3.12
Let Them Unsubscribe /wp-admin/options-general.php?page=ltu_settings9102.1827.2728.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_ltu-widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'IW_LTU_Admin_Page' not found in wp-content/plugins/let-them-unsubscribe/admin/unsubscribe-menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function iw_ltu_get_settings() in wp-content/plugins/let-them-unsubscribe/inc/upgrade.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/let-them-unsubscribe/admin/user-profile.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/let-them-unsubscribe/let-them-unsubscribe.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/let-them-unsubscribe/inc/widget.php:3
    • > PHP Notice
      Undefined variable: current_version in wp-content/plugins/let-them-unsubscribe/inc/upgrade.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'IW_LTU_Admin_Page' not found in wp-content/plugins/let-them-unsubscribe/admin/settings-menu.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: users, profiles

let-them-unsubscribe/let-them-unsubscribe.php Passed 13 tests

The entry point to "Let Them Unsubscribe" version 1.2.2 is a PHP file that has certain tags in its header comment area
35 characters long description:
Let the users delete their accounts

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
Everything looks great! No dangerous files found in this plugin567 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9177180514
PO File1243053

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.20
▷ Minimum class complexity6.00
▷ Maximum class complexity21.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods2980.56%
▷ Protected methods38.33%
▷ Private methods411.11%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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