89% shiftcontroller

Code Review | ShiftController Employee Shift Scheduling

WordPress plugin ShiftController Employee Shift Scheduling scored89%from 54 tests.

About plugin

  • Plugin page: shiftcontroller
  • Plugin version: 4.9.46
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 19, 2013
  • Latest release: Nov 25, 2023
  • Number of updates: 270
  • Update frequency: every 13.6 days
  • Top authors: hitcode (68.52%)plainware (31.85%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /86,802 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: ▲2.78MB] [CPU: ▲36.29ms] Passed 4 tests

Server-side resources used by ShiftController Employee Shift Scheduling
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.05 ▲2.5971.26 ▲32.76
Dashboard /wp-admin6.15 ▲2.8084.81 ▲22.20
Posts /wp-admin/edit.php6.20 ▲2.8592.53 ▲45.46
Add New Post /wp-admin/post-new.php8.97 ▲3.09140.21 ▲51.16
Media Library /wp-admin/upload.php6.10 ▲2.8777.45 ▲44.73

Server storage [IO: ▲1.77MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 364 new files
Database: no new tables, 21 new options
New WordPress options
sh4_calendar_17_shifttype
can_compress_scripts
sh4_migration_employees
sh4_migration_calendars
sh4_migration_shifts
widget_recent-comments
sh4_calendar_18_employee
sh4_migration_app
sh4_calendar_15_shifttype
sh4_calendar_15_employee
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for ShiftController Employee Shift Scheduling
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8614.34 ▼0.011.56 ▼0.2337.31 ▼7.45
Dashboard /wp-admin2,230 ▲525.58 ▼0.1097.67 ▼17.0142.12 ▼3.56
Posts /wp-admin/edit.php2,132 ▲321.97 ▼0.0342.01 ▼1.1836.95 ▲1.60
Add New Post /wp-admin/post-new.php1,552 ▲2322.92 ▼0.29616.81 ▼2.8452.83 ▼0.04
Media Library /wp-admin/upload.php1,432 ▲294.22 ▲0.0695.01 ▼1.7741.67 ▼2.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 21 options
    • sh4_calendar_17_employee
    • widget_recent-comments
    • sh4-rest_auth_code
    • sh4_migration_calendars
    • sh4_migration_conf
    • sh4_calendar_18_employee
    • db_upgraded
    • sh4_calendar_15_employee
    • sh4_calendar_16_employee
    • widget_theysaidso_widget
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

shiftcontroller/shiftcontroller4.php 92% from 13 tests

The principal PHP file in "ShiftController Employee Shift Scheduling" v. 4.9.46 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("shiftcontroller.php" instead of "shiftcontroller4.php")

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
Good job! No executable or dangerous file extensions detected51,251 lines of code in 352 files:
LanguageFilesBlank linesComment linesLines of code
PHP3358,1692,81938,425
PO File94,53609,178
JavaScript62631192,200
CSS2105441,448

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.11
▷ Minimum class complexity1.00
▷ Maximum class complexity757.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces65
Traits0
Classes324
▷ Abstract classes41.23%
▷ Concrete classes32098.77%
▷ Final classes00.00%
Methods2,040
▷ Static methods170.83%
▷ Public methods1,98897.45%
▷ Protected methods512.50%
▷ Private methods10.05%
Functions18
▷ Named functions211.11%
▷ Anonymous functions1688.89%
Constants22
▷ Global constants418.18%
▷ Class constants1881.82%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin