63% task-scheduler

Code Review | Task Scheduler

WordPress plugin Task Scheduler scored 63% from 54 tests.

About plugin

  • Plugin page: task-scheduler
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.9
  • WordPress version: 6.3.1
  • First release: Jul 30, 2014
  • Latest release: Feb 26, 2022
  • Number of updates: 128
  • Update frequency: every 21.6 days
  • Top authors: miunosoft (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active / 17,594 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.65MB] [CPU: ▲15.40ms] 50% from 4 tests

Server-side resources used by Task Scheduler
The following require your attention
  • RAM: You should keep total memory usage under 10MB (currently 12.67MB on /wp-admin/admin.php?page=ts_add_new)
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,080.49ms on /wp-admin/admin.php?page=ts_task_list)
PageMemory (MB)CPU Time (ms)
Home /6.14 ▲2.6854.94 ▲13.52
Dashboard /wp-admin7.32 ▲4.0262.53 ▲11.63
Posts /wp-admin/edit.php7.37 ▲4.0160.32 ▲11.61
Add New Post /wp-admin/post-new.php9.84 ▲3.96145.15 ▲43.48
Media Library /wp-admin/upload.php7.18 ▲3.9558.65 ▲24.82
Tests /wp-admin/admin.php?page=ts_tests11.1371.26
Tasks /wp-admin/admin.php?page=ts_task_list11.191,080.49
Settings /wp-admin/admin.php?page=ts_settings11.0770.18
Add New Task /wp-admin/admin.php?page=ts_add_new12.6786.07
Log /wp-admin/edit.php?post_type=ts_log7.6151.68

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 537 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Task Scheduler
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.59 ▼0.791.73 ▼0.0842.09 ▼3.55
Dashboard /wp-admin2,229 ▲415.83 ▼0.05105.18 ▼10.9780.48 ▲35.28
Posts /wp-admin/edit.php2,124 ▲561.98 ▼0.0234.16 ▼2.1430.55 ▼2.50
Add New Post /wp-admin/post-new.php1,545 ▲3121.47 ▲3.93803.65 ▲80.9251.58 ▼5.74
Media Library /wp-admin/upload.php1,426 ▲414.23 ▲0.0497.39 ▼3.8776.27 ▲31.33
Tests /wp-admin/admin.php?page=ts_tests1,0522.2842.6826.82
Tasks /wp-admin/admin.php?page=ts_task_list1,1412.0432.0629.08
Settings /wp-admin/admin.php?page=ts_settings1,1072.2535.7137.22
Add New Task /wp-admin/admin.php?page=ts_add_new1,1442.9549.7131.77
Log /wp-admin/edit.php?post_type=ts_log1,1151.9530.9427.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Compile error in wp-content/plugins/task-scheduler/task-scheduler.php+16
    Cannot declare class TaskScheduler_Registry_Base, because the name is already in use
  • Uninstaller has failed for this plugin, leaving 537 files (2.93MB) in the plugin directory
    • (new file) LICENSE.txt
    • (new file) asset/css/admin_wizard.css
    • (new file) asset/css/ts_task_list.css
    • (new file) asset/js/plugin-tests.js
    • (new file) asset/image/screen_icon_32x32.png
    • (new file) asset/css/wp53.css
    • (new file) asset/css/admin_settings.css
    • (new file) asset/css/meta_box.css
    • (new file) asset/css/ts_tests.css
    • (new file) asset/image/menu_icon_16x16.png
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
  • 392× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_PageMetaBox_Controller' not found in wp-content/plugins/task-scheduler/include/library/apf/factory/page_meta_box/AdminPageFramework_PageMetaBox.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_Model__FormSubmission__Validator__ContactForm' not found in wp-content/plugins/task-scheduler/include/library/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_FieldType' not found in wp-content/plugins/task-scheduler/include/library/apf/factory/_common/form/field_type/select/AdminPageFramework_FieldType_select.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/task-scheduler/include/library/apf/factory/admin_page/_view/AdminPageFramework_View__PageMetaboxEnabler.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPage_Tab_Base' not found in wp-content/plugins/task-scheduler/include/class/admin/page/wizard/tab/TaskScheduler_AdminPage_Wizard__Tab__AddNewTask.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_PostType' not found in wp-content/plugins/task-scheduler/include/class/post_type/log/TaskScheduler_PostType_Log_Base.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_FieldType' not found in wp-content/plugins/task-scheduler/include/library/apf/custom-field-types/date-time-custom-field-types/DateTimeRangeCustomFieldType.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_WPUtility_URL' not found in wp-content/plugins/task-scheduler/include/library/apf/factory/_common/utility/wp_utility/AdminPageFramework_WPUtility_HTML.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPage_RootBase' not found in wp-content/plugins/task-scheduler/include/class/admin/page/_abstract/TaskScheduler_AdminPage_Page_Base.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'TaskScheduler_AdminPageFramework_Input_Base' not found in wp-content/plugins/task-scheduler/include/library/apf/factory/_common/form/input/AdminPageFramework_Input_checkbox.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

task-scheduler/task-scheduler.php Passed 13 tests

The main PHP script in "Task Scheduler" version 1.6.3 is automatically included on every request by WordPress
58 characters long description:
Provides an enhanced task management system for WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin38,253 lines of code in 482 files:
LanguageFilesBlank linesComment linesLines of code
PHP4213,3398,49724,941
JavaScript298743,0309,561
CSS302492242,698
PO File1429618992
Markdown125061

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.12
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes421
▷ Abstract classes12730.17%
▷ Concrete classes29469.83%
▷ Final classes3110.54%
Methods2,346
▷ Static methods37515.98%
▷ Public methods1,32556.48%
▷ Protected methods39516.84%
▷ Private methods62626.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants34
▷ Global constants514.71%
▷ Class constants2985.29%
▷ Public constants29100.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
18 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
include/library/apf/custom-field-types/date-time-custom-field-types/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
asset/image/menu_icon_16x16.png0.54KB0.52KB▼ 4.67%
include/library/apf/custom-field-types/path-custom-field-type/asset/jstree/themes/default/32px.png5.53KB2.93KB▼ 47.03%