62% wp-employee-attendance-system

Code Review | WP Employee Attendance System

WordPress plugin WP Employee Attendance System scored62%from 54 tests.

About plugin

  • Plugin page: wp-employee-atten...
  • Plugin version: 3.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 7, 2020
  • Latest release: Nov 18, 2023
  • Number of updates: 17
  • Update frequency: every 65.1 days
  • Top authors: suhassurse (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,484 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.09MB] [CPU: ▼0.12ms] Passed 4 tests

This is a short check of server-side resources used by WP Employee Attendance System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.58 ▼5.15
Dashboard /wp-admin3.40 ▲0.1047.08 ▼1.29
Posts /wp-admin/edit.php3.45 ▲0.1046.73 ▲2.36
Add New Post /wp-admin/post-new.php5.98 ▲0.1090.40 ▲8.88
Media Library /wp-admin/upload.php3.32 ▲0.1035.70 ▲3.62
Attendance Update /wp-admin/admin.php?page=Attendance_Update3.2729.03
Take Todays Attendance /wp-admin/admin.php?page=Attendance_Panel3.2933.65
Employee Delete /wp-admin/admin.php?page=Employee_Delete3.2929.52
Employee Update /wp-admin/admin.php?page=Employee_Update3.2728.35
View Todays Attendance /wp-admin/admin.php?page=View_Todays_Attendance3.2929.73
Employee Insert /wp-admin/admin.php?page=Employee_Insert3.2928.34
View All Attendance /wp-admin/admin.php?page=View_All_Attendance3.2927.92
Employee Attendance /wp-admin/admin.php?page=Employee_Attendance3.2930.40
Employee Listing /wp-admin/admin.php?page=Employee_Listing3.2929.86

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: 2 new tables, 7 new options
New tables
wp_employee_details
wp_attendance_taken
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
jal_db_version
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Employee Attendance System
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7714.58 ▲0.231.63 ▼0.1136.29 ▼10.25
Dashboard /wp-admin2,247 ▲675.56 ▼0.1291.31 ▼0.6737.99 ▼7.78
Posts /wp-admin/edit.php2,149 ▲492.03 ▲0.0839.32 ▲3.7935.95 ▲4.52
Add New Post /wp-admin/post-new.php1,569 ▲3923.23 ▲0.22596.08 ▼31.2346.39 ▼0.75
Media Library /wp-admin/upload.php1,521 ▲1244.20 ▼0.0996.89 ▼1.4842.92 ▲0.89
Attendance Update /wp-admin/admin.php?page=Attendance_Update8732.0426.4327.24
Take Todays Attendance /wp-admin/admin.php?page=Attendance_Panel8392.0025.3128.61
Employee Delete /wp-admin/admin.php?page=Employee_Delete1,6352.9542.9336.29
Employee Update /wp-admin/admin.php?page=Employee_Update9502.0225.2034.29
View Todays Attendance /wp-admin/admin.php?page=View_Todays_Attendance8592.1424.8330.78
Employee Insert /wp-admin/admin.php?page=Employee_Insert9572.0224.6731.71
View All Attendance /wp-admin/admin.php?page=View_All_Attendance9071.9725.9829.00
Employee Attendance /wp-admin/admin.php?page=Employee_Attendance9561.9723.9252.12
Employee Listing /wp-admin/admin.php?page=Employee_Listing8612.0124.5128.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_employee_details
    • wp_attendance_taken
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • jal_db_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+6
    Undefined index: id
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+63
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+26
    Trying to get property 'id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+29
    Trying to get property 'name' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Attendance_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/update_todays_attendance.php+43
    Trying to get property 'attendance' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+40
    Trying to get property 'gender' of non-object
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+48
    Trying to get property 'email' of non-object
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+53
    Trying to get property 'DOB' of non-object
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+58
    Trying to get property 'contact_no' of non-object
    • > GET request to /wp-admin/admin.php?page=Employee_Update
    • > Notice in wp-content/plugins/wp-employee-attendance-system/employee_update.php+63
    Trying to get property 'department' of non-object

SRP 50% 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-employee-attendance-system/employee_attendance.php:42

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Listing
    • > Network (severe)
    wp-content/plugins/wp-employee-attendance-system/css/fonts/Poppins-Regular.woff2 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Listing
    • > Network (severe)
    wp-content/plugins/wp-employee-attendance-system/css/fonts/Poppins-Regular.woff - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Employee_Listing
    • > Network (severe)
    wp-content/plugins/wp-employee-attendance-system/css/fonts/Poppins-Regular.ttf - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-employee-attendance-system === )
The official readme.txt might help

wp-employee-attendance-system/employee_attendance.php 92% from 13 tests

The principal PHP file in "WP Employee Attendance System" v. 3.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-employee-attendance-system.php" instead of "employee_attendance.php")

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
Everything looks great! No dangerous files found in this plugin2,235 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS3208721,441
PHP1115852794

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin