78% timesheet

Code Review | Timesheet by BestWebSoft

WordPress plugin Timesheet by BestWebSoft scored 78% from 54 tests.

About plugin

  • Plugin page: timesheet
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 15, 2016
  • Latest release: Aug 10, 2023
  • Number of updates: 37
  • Update frequency: every 70.6 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active / 10,690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.11ms] Passed 4 tests

This is a short check of server-side resources used by Timesheet by BestWebSoft
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.60 ▼5.56
Dashboard /wp-admin3.39 ▲0.0845.23 ▼3.01
Posts /wp-admin/edit.php3.50 ▲0.1450.78 ▲5.32
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.87 ▼5.18
Media Library /wp-admin/upload.php3.31 ▲0.0837.84 ▲5.32
BWS Panel /wp-admin/admin.php?page=tmsht-bws-panel3.7536.66
Settings /wp-admin/admin.php?page=timesheet_settings3.6547.48
My Availability /wp-admin/admin.php?page=timesheet_ts_user3.2867.29
Team /wp-admin/admin.php?page=timesheet_ts_report3.3046.66

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 134 new files
Database: 2 new tables, 8 new options
New tables
wp_tmsht_ts
wp_tmsht_legends
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
tmsht_options
bstwbsftwppdtplgns_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Timesheet by BestWebSoft
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲7313.40 ▼1.281.70 ▼0.5438.76 ▼3.56
Dashboard /wp-admin2,247 ▲565.89 ▲1.02112.14 ▲12.6343.53 ▲4.66
Posts /wp-admin/edit.php2,130 ▲412.07 ▲0.0437.06 ▲2.1333.04 ▲0.47
Add New Post /wp-admin/post-new.php1,551 ▲3723.30 ▲5.80673.10 ▲10.0971.24 ▲14.36
Media Library /wp-admin/upload.php1,432 ▲474.24 ▲0.0194.61 ▼4.3040.26 ▼3.93
BWS Panel /wp-admin/admin.php?page=tmsht-bws-panel3,0371.9836.2679.81
Settings /wp-admin/admin.php?page=timesheet_settings3,1293.1686.3949.62
My Availability /wp-admin/admin.php?page=timesheet_ts_user11,7493.94113.4150.64
Team /wp-admin/admin.php?page=timesheet_ts_report2,2232.4252.5430.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/timesheet/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/timesheet/timesheet.php:2906
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/timesheet/includes/class-tmsht-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timesheet/bws_menu/class-bws-settings.php:1452

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/captcha-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/columns-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/contact-form-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/contact-form-to-db/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/custom-admin-page/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/custom-search-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/donate-button/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/facebook-button-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/error-log-viewer/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/gallery-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-google-2-step-verification/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-google-analytics/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/google-captcha/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-google-maps/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/google-sitemap-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/google-shortlink/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/htaccess/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/limit-attempts/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/job-board/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-linkedin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/multilanguage/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/pagination/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/pdf-print/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-pinterest/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/portfolio/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/profile-extra-fields/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/post-to-csv/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/promobar/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/quotes-and-tips/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/rating-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/realty/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/relevant/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/sender/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/slider-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-smtp/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/social-login-bws/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/social-buttons-pack/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/bws-testimonials/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/subscriber/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/timesheet/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/twitter-plugin/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/user-role/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/updater/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=tmsht-bws-panel
    • > Network (severe)
    http://ps.w.org/visitors-online/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Settings page.), #2 ("My Availability" page.), #3 ("My Availability" page with context menu.), #4 (Team page.)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

timesheet/timesheet.php Passed 13 tests

The main PHP file in "Timesheet by BestWebSoft" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
101 characters long description:
Best timesheet plugin for WordPress. Track employee time, streamline attendance and generate reports.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin25,339 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PO File113,8865,7248,500
CSS132893317,751
PHP98116517,376
JavaScript102341661,562
SVG400150

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.59
Average class complexity110.67
▷ Minimum class complexity21.00
▷ Maximum class complexity210.00
Average method complexity11.97
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2480.00%
▷ Protected methods00.00%
▷ Private methods620.00%
Functions83
▷ Named functions83100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
70 PNG files occupy 3.32MB with 1.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.10.4/images/ui-icons_cd0a0a_256x240.png4.49KB4.20KB▼ 6.46%
images/jquery-ui/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
bws_menu/icons/themes/renty.png657.95KB198.11KB▼ 69.89%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_454545_256x240.png6.92KB4.18KB▼ 39.61%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_55_fbf9ee_1x400.png0.38KB0.12KB▼ 67.68%