10% todo-lists-for-membership-sites

Code Review | To Do List Member

WordPress plugin To Do List Member scored10%from 54 tests.

About plugin

  • Plugin page: todo-lists-for-me...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jan 19, 2013
  • Latest release: Nov 28, 2018
  • Number of updates: 38
  • Update frequency: every 56.3 days
  • Top authors: tjessee (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

30+ active /7,201 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/todo-lists-for-membership-sites/todolists.php+908
    Undefined variable: sql1

Server metrics [RAM: ▼1.68MB] [CPU: ▼45.92ms] Passed 4 tests

A check of server-side resources used by To Do List Member
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.159.94 ▼29.23
Dashboard /wp-admin2.33 ▼0.9813.06 ▼32.43
Posts /wp-admin/edit.php2.33 ▼1.0310.98 ▼37.43
Add New Post /wp-admin/post-new.php2.33 ▼3.5611.47 ▼84.58
Media Library /wp-admin/upload.php2.33 ▼0.9010.83 ▼25.67
Tasks /wp-admin/edit.php?post_type=task2.3312.06
Settings /wp-admin/edit.php?post_type=task&page=todolist_settings2.3311.68
Add New Task /wp-admin/post-new.php?post_type=task2.3311.28
List Categories /wp-admin/edit-tags.php?taxonomy=listcategory&post_type=task2.3312.45
Order Tasks /wp-admin/edit.php?post_type=task&page=todolists_ordertask2.3312.55

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: 2 new tables, 7 new options
New tables
wp_todolists_iptask
wp_todolists_usertask
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_todolist_base

Browser metrics Passed 4 tests

This is an overview of browser requirements for To Do List Member
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,052 ▲31714.18 ▼0.446.49 ▲4.8040.85 ▼0.17
Dashboard /wp-admin2,317 ▲1285.18 ▲0.22110.56 ▼8.0571.16 ▲28.06
Posts /wp-admin/edit.php2,216 ▲1272.42 ▲0.4041.33 ▲0.7336.13 ▲0.06
Add New Post /wp-admin/post-new.php1,598 ▲6523.28 ▼0.02694.92 ▲18.1835.16 ▼19.08
Media Library /wp-admin/upload.php1,505 ▲1174.51 ▲0.3299.36 ▼4.9368.82 ▲21.78
Tasks /wp-admin/edit.php?post_type=task1,2792.5436.9330.64
Settings /wp-admin/edit.php?post_type=task&page=todolist_settings9272.1334.2125.97
Add New Task /wp-admin/post-new.php?post_type=task2,4308.10187.91132.13
List Categories /wp-admin/edit-tags.php?taxonomy=listcategory&post_type=task1,3942.2130.2934.09
Order Tasks /wp-admin/edit.php?post_type=task&page=todolists_ordertask9432.3132.7724.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% 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
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in todolist_widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_todolists_usertask
    • wp_todolists_iptask
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_todolist_base

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=task&page=todolists_ordertask
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in todolist_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/edit.php?post_type=task&page=todolists_ordertask
    • > Notice in wp-content/plugins/todo-lists-for-membership-sites/todolists.php+759
    Undefined index: submit

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/todo-lists-for-membership-sites/res/index.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/todo-lists-for-membership-sites/widget/widget-todolist.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/todo-lists-for-membership-sites/todolists.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/todo-lists-for-membership-sites/code/shortcodes.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

todo-lists-for-membership-sites/todolists.php 92% from 13 tests

The principal PHP file in "To Do List Member" v. 1.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("todo-lists-for-membership-sites.php" instead of "todolists.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected4,796 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP61,4732933,024
JavaScript51573351,542
XML200138
CSS382792

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity95.20
▷ Minimum class complexity4.00
▷ Maximum class complexity265.00
Average method complexity5.66
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods101
▷ Static methods00.00%
▷ Public methods4645.54%
▷ Protected methods5453.47%
▷ Private methods10.99%
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
9 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/tinymce/todolists-progressbar.png0.26KB0.24KB▼ 9.26%
css/images/controls.png2.83KB1.28KB▼ 54.82%
img/move.png0.11KB0.11KB0.00%
js/tinymce/todolists-tasklist.png0.89KB1.03KB0.00%
css/images/overlay.png2.75KB0.11KB▼ 95.99%