68% hrm-work-tracking

Code Review | HRM Work Tracking

WordPress plugin HRM Work Tracking scored68%from 54 tests.

About plugin

  • Plugin page: hrm-work-tracking
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6.2
  • WordPress version: 6.3.1
  • First release: Apr 24, 2013
  • Latest release: Feb 5, 2021
  • Number of updates: 48
  • Update frequency: every 59.3 days
  • Top authors: theode (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /12,413 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.13MB] [CPU: ▼18.37ms] Passed 4 tests

An overview of server-side resources used by HRM Work Tracking
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.58 ▼2.78
Dashboard /wp-admin3.23 ▼0.0731.24 ▼16.81
Posts /wp-admin/edit.php3.30 ▼0.0637.48 ▼17.67
Add New Post /wp-admin/post-new.php5.48 ▼0.4173.61 ▼36.20
Media Library /wp-admin/upload.php3.24 ▲0.0132.48 ▼2.73
HRM Welcome Page /wp-admin/index.php?page=hrm-dashboard-page3.2129.65
Settings /wp-admin/users.php?page=hrm-settings3.2131.48
Sick Certificate /wp-admin/users.php?page=hrm-ill-page3.2131.22
Human Resources Department /wp-admin/users.php?page=hrm-settings-page3.2131.07
Pop Out /wp-admin/users.php?page=hrm-pop-out3.2129.91

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
hrm_deferred_admin_notices
widget_recent-posts
widget_recent-comments
hrm_version
human_resources_department

Browser metrics Passed 4 tests

A check of browser resources used by HRM Work Tracking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,004 ▲26913.49 ▼1.101.60 ▼0.0540.90 ▼7.20
Dashboard /wp-admin2,412 ▲2275.18 ▲0.31110.31 ▲5.7045.26 ▲4.46
Posts /wp-admin/edit.php2,127 ▲382.20 ▲0.1740.17 ▼0.1235.42 ▼0.94
Add New Post /wp-admin/post-new.php1,545 ▲1223.09 ▼0.16653.07 ▲16.6667.25 ▼3.48
Media Library /wp-admin/upload.php1,420 ▲324.28 ▲0.0499.94 ▲3.6540.37 ▼0.59
HRM Welcome Page /wp-admin/index.php?page=hrm-dashboard-page1,2915.0198.4657.34
Settings /wp-admin/users.php?page=hrm-settings9221.8425.0732.52
Sick Certificate /wp-admin/users.php?page=hrm-ill-page8241.8325.5826.26
Human Resources Department /wp-admin/users.php?page=hrm-settings-page8861.8927.3429.27
Pop Out /wp-admin/users.php?page=hrm-pop-out7961.8326.2216.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'hrm_deactivation' not found or invalid function name
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • human_resources_department
    • db_upgraded
    • hrm_deferred_admin_notices
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • hrm_version
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=hrm-pop-out
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'hrm_admin_notices' not found or invalid function name
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=hrm-settings-page
    • > Notice in wp-content/plugins/hrm-work-tracking/hrm-users.php+396
    Undefined index: HTTPS
    • > GET request to /wp-admin/users.php?page=hrm-settings-page
    • > Warning in wp-content/plugins/hrm-work-tracking/hrm-users.php+253
    A non-numeric value encountered

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 items
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/hrm-work-tracking/count.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hrm-work-tracking/user-extras.php:10
    • > PHP Notice
      Undefined variable: in_pause in wp-content/plugins/hrm-work-tracking/count.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hrm-work-tracking/hrm_popup.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hrm-work-tracking/hrm_security.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hrm-work-tracking/hrm_dashboard.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hrm-work-tracking/hrm_settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hrm-work-tracking/hrm_ill.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hrm-work-tracking/hrm_task_widget.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hrm-work-tracking/hrm_security.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

hrm-work-tracking/hrm-work-tracking.php Passed 13 tests

Analyzing the main PHP file in "HRM Work Tracking" version 1.5
51 characters long description:
A plugin to track the time from users on your blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,110 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP132712231,756
CSS32244763
PO File5253480547
JavaScript221844

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.30
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%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
13 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery/flick/images/ui-bg_highlight-soft_50_dddddd_1x100.png0.27KB0.14KB▼ 48.21%
jquery/flick/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
jquery/flick/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
jquery/flick/images/ui-bg_highlight-soft_25_0073ea_1x100.png0.33KB0.18KB▼ 45.27%
jquery/flick/images/ui-bg_flat_0_eeeeee_40x100.png0.21KB0.08KB▼ 60.45%