68% clock-in-portal

Code Review | Clock In Portal- Staff & Attendance Management

WordPress plugin Clock In Portal- Staff & Attendance Management scored 68% from 54 tests.

About plugin

  • Plugin page: clock-in-portal
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.1
  • WordPress version: 6.3.1
  • First release: Dec 8, 2016
  • Latest release: Dec 24, 2022
  • Number of updates: 55
  • Update frequency: every 40.0 days
  • Top authors: weblizar (87.27%)vibhorp (14.55%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active / 16,011 total downloads

Benchmarks

Plugin footprint 65% 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: ▲0.24MB] [CPU: ▲0.77ms] Passed 4 tests

An overview of server-side resources used by Clock In Portal- Staff & Attendance Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2238.82 ▼4.03
Dashboard /wp-admin3.55 ▲0.2549.40 ▲3.01
Posts /wp-admin/edit.php3.66 ▲0.3052.02 ▲2.33
Add New Post /wp-admin/post-new.php6.13 ▲0.24101.94 ▲12.15
Media Library /wp-admin/upload.php3.47 ▲0.2439.89 ▲1.76
Clock In Portal /wp-admin/admin.php?page=clock-in-portal3.5435.84
/wp-admin/index.php?page=cip-setup-wizard-free3.3929.14
Designations /wp-admin/admin.php?page=cip-designations3.5234.37
How to Work /wp-admin/admin.php?page=cip-help3.5035.84
Settings /wp-admin/admin.php?page=cip-settings4.9342.42
Reports /wp-admin/admin.php?page=cip-reports3.9334.77
Holidays /wp-admin/admin.php?page=cip-holidays3.5736.22
Staff /wp-admin/admin.php?page=cip-staffs3.7237.60
Leave Request /wp-admin/admin.php?page=cip-staff-request3.7032.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 147 new files
Database: 3 new tables, 7 new options
New tables
wp_sm_attendance
wp_sm_staffs
wp_sm_staff_category
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
cip_official_holidays

Browser metrics Passed 4 tests

A check of browser resources used by Clock In Portal- Staff & Attendance Management
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16614.28 ▼0.101.85 ▼0.0543.03 ▲0.79
Dashboard /wp-admin2,290 ▲1024.86 ▼1.03109.77 ▼2.5942.84 ▲2.43
Posts /wp-admin/edit.php2,139 ▲502.04 ▲0.0539.43 ▼1.5535.53 ▼0.53
Add New Post /wp-admin/post-new.php1,572 ▲3523.39 ▲0.18594.30 ▼88.9458.69 ▲3.51
Media Library /wp-admin/upload.php1,435 ▲504.22 ▲0.0497.92 ▼1.2042.61 ▼1.72
Clock In Portal /wp-admin/admin.php?page=clock-in-portal92319.81411.4998.52
/wp-admin/index.php?page=cip-setup-wizard-free3622.6552.1720.79
Designations /wp-admin/admin.php?page=cip-designations93819.87395.7845.14
How to Work /wp-admin/admin.php?page=cip-help93019.83404.7048.49
Settings /wp-admin/admin.php?page=cip-settings3,49919.84308.5446.60
Reports /wp-admin/admin.php?page=cip-reports1,03619.88307.5242.65
Holidays /wp-admin/admin.php?page=cip-holidays98019.92285.2634.63
Staff /wp-admin/admin.php?page=cip-staffs1,09919.84279.1937.46
Leave Request /wp-admin/admin.php?page=cip-staff-request97619.89306.4635.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 3 tables
    • wp_sm_staffs
    • wp_sm_staff_category
    • wp_sm_attendance
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • cip_official_holidays
    • widget_recent-posts

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/clock-in-portal/subscribers/staff-holidays.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clock-in-portal/help.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/clock-in-portal/settings/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/clock-in-portal/pro_features.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/index.php?page=cip-setup-wizard-free
    • > Console-api (warning) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28609 "jQuery.Deferred exception: jQuery(...).DataTable is not a function" "TypeError: jQuery(...).DataTable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/clock-in-portal//js/admin-setup.js?ver=1:43:27)\n at e (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:26990)\n at t (/wp-includes/js/jquery/jquery.min.js?ver=3.7.0:2:27292)" undefined
    • > GET request to /wp-admin/index.php?page=cip-setup-wizard-free
    • > Javascript (severe) in unknown
    /wp-includes/js/jquery/jquery.min.js?ver=3.7.0 1:28721 Uncaught TypeError: jQuery(...).DataTable is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: scheduler, clock in and out, attendance, check in, check out...

clock-in-portal/clock-in-portal.php 85% from 13 tests

The principal PHP file in "Clock In Portal- Staff & Attendance Management" v. 2.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected106,449 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript293,0792,99667,071
CSS182,9157119,682
SVG601212,004
PHP236533637,086
PO File1264339606

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity22.25
▷ Minimum class complexity3.00
▷ Maximum class complexity33.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods1244.44%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 compressed PNG files occupy 0.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sort_asc.png0.16KB0.25KB0.00%
new-assets/images/logo.png6.55KB3.97KB▼ 39.36%
image/christmas.png194.21KB210.44KB0.00%
images/sort_desc.png0.15KB0.25KB0.00%
image/logo.png2.91KB2.91KB0.00%