10% employee-scheduler

Code Review | Shiftee Basic - Employee and Staff Scheduling

WordPress plugin Shiftee Basic - Employee and Staff Scheduling scored 10% from 54 tests.

About plugin

  • Plugin page: employee-scheduler
  • Plugin version: 2.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: Jul 3, 2018
  • Number of updates: 67
  • Update frequency: every 17.3 days
  • Top authors: Gwendydd (97.01%)range (4.48%)

Code review

54 tests

User reviews

9 reviews

Install metrics

100+ active / 25,937 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/employee-scheduler/includes/class-shiftee-basic-activator.php+80
    Use of undefined constant SHIFTEE_BASIC_VERSION - assumed 'SHIFTEE_BASIC_VERSION' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲2.44MB] [CPU: ▲19.75ms] Passed 4 tests

Server-side resources used by Shiftee Basic - Employee and Staff Scheduling
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.66 ▲2.2077.37 ▲31.33
Dashboard /wp-admin5.76 ▲2.4572.32 ▲17.85
Posts /wp-admin/edit.php5.93 ▲2.5779.81 ▲23.70
Add New Post /wp-admin/post-new.php8.47 ▲2.58110.37 ▲6.11
Media Library /wp-admin/upload.php5.78 ▲2.5575.65 ▲39.12
All Shifts /wp-admin/edit.php?post_type=shift5.9773.48
Job Categories /wp-admin/edit-tags.php?taxonomy=job_category&post_type=job5.7767.19
Add New /wp-admin/post-new.php?post_type=job8.62111.54
Add New /wp-admin/post-new.php?post_type=expense8.61114.07
Shift Statuses /wp-admin/edit-tags.php?taxonomy=shift_status&post_type=shift5.7772.28
Instructions /wp-admin/admin.php?page=instructions5.7367.51
Expense Categories /wp-admin/edit-tags.php?taxonomy=expense_category&post_type=expense5.7765.74
All Expenses /wp-admin/edit.php?post_type=expense5.9792.33
All Jobs /wp-admin/edit.php?post_type=job5.9169.00
Shiftee Basic /wp-admin/admin.php?page=shiftee5.7366.76

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 609 new files
Database: 2 new tables, 14 new options
New tables
wp_p2pmeta
wp_p2p
New WordPress options
p2p_storage
db_upgraded
widget_p2p
widget_recent-posts
expense_category_children
can_compress_scripts
widget_recent-comments
shift_type_children
theysaidso_admin_options
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Shiftee Basic - Employee and Staff Scheduling: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲16913.21 ▲0.001.75 ▼0.2040.43 ▼5.46
Dashboard /wp-admin2,346 ▲1464.94 ▼0.85115.41 ▲13.4285.96 ▲44.04
Posts /wp-admin/edit.php2,250 ▲1582.07 ▲0.0740.32 ▲4.7634.88 ▲0.77
Add New Post /wp-admin/post-new.php1,657 ▲12419.97 ▼3.60621.15 ▼63.9753.57 ▼13.70
Media Library /wp-admin/upload.php1,534 ▲1494.19 ▼0.0299.58 ▼0.3671.43 ▲29.11
All Shifts /wp-admin/edit.php?post_type=shift1,2852.0335.3037.09
Job Categories /wp-admin/edit-tags.php?taxonomy=job_category&post_type=job1,4162.3527.5435.03
Add New /wp-admin/post-new.php?post_type=job1,69116.89843.0434.18
Add New /wp-admin/post-new.php?post_type=expense9721.7010.594.13
Shift Statuses /wp-admin/edit-tags.php?taxonomy=shift_status&post_type=shift1,6332.4729.2936.69
Instructions /wp-admin/admin.php?page=instructions1,3062.1025.9544.83
Expense Categories /wp-admin/edit-tags.php?taxonomy=expense_category&post_type=expense1,5752.3530.0235.61
All Expenses /wp-admin/edit.php?post_type=expense1,2462.0039.1032.68
All Jobs /wp-admin/edit.php?post_type=job1,2162.0137.9533.93
Shiftee Basic /wp-admin/admin.php?page=shiftee2,1881.8829.6734.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_p2pmeta
    • wp_p2p
  • Zombie WordPress options detected upon uninstall: 14 options
    • p2p_storage
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • wpaesm_options
    • widget_theysaidso_widget
    • shift_type_children
    • widget_p2p
    • expense_status_children
    • expense_category_children
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shiftee
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
    • > GET request to /wp-admin/post-new.php?post_type=expense
    • > Compile error in wp-content/plugins/employee-scheduler/libraries/cmb2/includes/types/CMB2_Type_Text_Date.php+15
    Declaration of CMB2_Type_Text_Date::render() must be compatible with CMB2_Type_Text::render($args = Array)

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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/employee-scheduler/public/partials/shiftee-public-display.php
  • 91× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/employee-scheduler/libraries/cmb2/includes/types/CMB2_Type_Title.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/employee-scheduler/libraries/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/employee-scheduler/public/partials/single-shift.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/employee-scheduler/admin/partials/metabox-shift.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_hookup' not found in wp-content/plugins/employee-scheduler/libraries/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/employee-scheduler/libraries/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/employee-scheduler/admin/partials/metabox-job.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'P2P_Factory' not found in wp-content/plugins/employee-scheduler/libraries/wpp2p/admin/box-factory.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'P2P_Indeterminate_Connection_Type' not found in wp-content/plugins/employee-scheduler/libraries/wpp2p/reciprocal-connection-type.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'P2P_Side' not found in wp-content/plugins/employee-scheduler/libraries/wpp2p/side-user.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

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

The primary PHP file in "Shiftee Basic - Employee and Staff Scheduling" version 2.2.2 is used by WordPress to initiate all plugin functionality
120 characters long description:
Complete staff schedule management system: create and display schedule, let employees clock in and out, report expenses.

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
No dangerous file extensions were detected79,231 lines of code in 427 files:
LanguageFilesBlank linesComment linesLines of code
PO File12213,80017,90431,621
JavaScript895,3162,87519,548
PHP1585,55010,96618,954
CSS241,7361,5056,994
Sass15291251,330
Markdown62260642
HTML1170107
JSON20035

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity18.46
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces3
Traits0
Classes151
▷ Abstract classes2013.25%
▷ Concrete classes13186.75%
▷ Final classes00.00%
Methods1,320
▷ Static methods18914.32%
▷ Public methods1,09182.65%
▷ Protected methods17513.26%
▷ Private methods544.09%
Functions86
▷ Named functions86100.00%
▷ Anonymous functions00.00%
Constants43
▷ Global constants2660.47%
▷ Class constants1739.53%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
39 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/fullcalendar/lib/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png0.36KB0.17KB▼ 53.41%
libraries/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
libraries/fullcalendar/lib/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png0.39KB0.16KB▼ 60.40%
libraries/Tax-meta-class/images/remove.png2.15KB1.67KB▼ 22.25%
libraries/fullcalendar/lib/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png0.30KB0.16KB▼ 48.06%