68% smart-todo

Code Review | Smart ToDo Plugin

WordPress plugin Smart ToDo Plugin scored68%from 54 tests.

About plugin

  • Plugin page: smart-todo
  • Plugin version: 1.1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 13, 2015
  • Latest release: Jul 14, 2021
  • Number of updates: 17
  • Update frequency: every 136.2 days
  • Top authors: sherkspear (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /2,123 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.91MB] [CPU: ▼32.97ms] Passed 4 tests

A check of server-side resources used by Smart ToDo Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.19 ▼1.36
Dashboard /wp-admin3.03 ▼0.2724.27 ▼26.91
Posts /wp-admin/edit.php3.03 ▼0.3324.68 ▼28.23
Add New Post /wp-admin/post-new.php3.03 ▼2.8624.54 ▼69.31
Media Library /wp-admin/upload.php3.03 ▼0.2024.26 ▼7.41
Add New /wp-admin/post-new.php?post_type=smart_todo3.0322.66
How To Use /wp-admin/edit.php?post_type=smart_todo&page=smarttodo_info3.0324.19
Projects /wp-admin/edit-tags.php?taxonomy=smart_project&post_type=smart_todo3.0324.70
Smart ToDos /wp-admin/edit.php?post_type=smart_todo3.0323.70
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=smart_todo3.0322.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Smart ToDo Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲13213.24 ▼0.982.32 ▲0.2742.94 ▼2.64
Dashboard /wp-admin2,245 ▲575.84 ▲0.9797.98 ▼19.1840.77 ▼6.86
Posts /wp-admin/edit.php2,128 ▲392.00 ▼0.0136.75 ▲0.9333.13 ▼4.22
Add New Post /wp-admin/post-new.php1,566 ▲2423.17 ▲4.77633.33 ▼16.0457.72 ▲4.27
Media Library /wp-admin/upload.php1,430 ▲424.20 ▼0.0394.89 ▼2.8941.70 ▼0.80
Add New /wp-admin/post-new.php?post_type=smart_todo2,7497.90183.0371.07
How To Use /wp-admin/edit.php?post_type=smart_todo&page=smarttodo_info1,1192.0328.5739.06
Projects /wp-admin/edit-tags.php?taxonomy=smart_project&post_type=smart_todo1,3012.1329.3327.31
Smart ToDos /wp-admin/edit.php?post_type=smart_todo1,1671.9330.3031.11
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=smart_todo1,3462.1428.6828.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=smart_todo
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-todo/includes/CPT_SmartTodo.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-todo/includes/SmartToDoMenu.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'SmartTodoInfo' not found in wp-content/plugins/smart-todo/templates/smarttodo_dashboard.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-todo/includes/CssJsScripts.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-todo/includes/CPT_SmartTodo.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_terms() in wp-content/plugins/smart-todo/templates/single-smart_todo-content.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
Attributes that require attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

smart-todo/smart-todos.php 92% from 13 tests

"Smart ToDo Plugin" version 1.1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("smart-todo.php" instead of "smart-todos.php")

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 plugin9,306 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,0497,1137,310
CSS1037931,604
PHP711387392

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods20100.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
8 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dbtables/media/images/sort_asc.png0.16KB0.25KB0.00%
assets/dbtables/media/images/sort_both.png0.20KB0.29KB0.00%
assets/dbtables/media/images/sort_desc.png0.15KB0.25KB0.00%
assets/img/glyphicons.png108.59KB52.69KB▼ 51.48%
assets/dbtables/media/images/sort_asc_disabled.png0.14KB0.25KB0.00%