58% time-tracker

Code Review | Time Tracker

WordPress plugin Time Tracker scored58%from 54 tests.

About plugin

  • Plugin page: time-tracker
  • Plugin version: 3.0.10
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2020
  • Latest release: Sep 11, 2023
  • Number of updates: 76
  • Update frequency: every 13.2 days
  • Top authors: GermanPearls (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /5,964 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.60ms] Passed 4 tests

An overview of server-side resources used by Time Tracker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.87 ▼4.77
Dashboard /wp-admin3.31 ▲0.0043.84 ▼7.62
Posts /wp-admin/edit.php3.36 ▲0.0043.54 ▼3.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.98 ▼14.95
Media Library /wp-admin/upload.php3.23 ▲0.0035.01 ▲0.94

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 121 new files
Database: no new tables, 9 new options
New WordPress options
time_tracker_admin_notices
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
time_tracker_version
widget_recent-posts
can_compress_scripts
time_tracker_install_time
widget_recent-comments

Browser metrics Passed 4 tests

Time Tracker: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.27 ▼1.111.92 ▲0.1644.26 ▲0.25
Dashboard /wp-admin2,209 ▲215.89 ▲0.04100.14 ▼5.6437.68 ▼2.52
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0435.19 ▼1.3834.58 ▲2.23
Add New Post /wp-admin/post-new.php1,534 ▲2023.38 ▲5.80637.01 ▼56.2952.27 ▼15.88
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0392.09 ▼10.5340.59 ▼4.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/time-tracker/admin/function-tt-export-tables.php+40
    tempnam(): file created in the system's temporary directory
  • Uninstaller has failed for this plugin, leaving 121 files (0.56MB) in the plugin directory
    • (new file) .gitattributes
    • (new file) admin/class-tt-display-message-check-task-added.php
    • (new file) admin/class-tt-display-message-check-client-added.php
    • (new file) admin/function-tt-export-tables.php
    • (new file) LICENSE
    • (new file) admin/class-tt-shortcode-error-alert.php
    • (new file) admin/class-tt-sql-result-display-message.php
    • (new file) admin/function-tt-delete-tables.php
    • (new file) admin/function-tt-export-button.php
    • (new file) admin/function-tt-admin-notice.php
    • ...
  • This plugin does not fully uninstall, leaving 11 options in the database
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • time_tracker_version
    • widget_recent-posts
    • time_tracker_admin_notices
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • time_tracker_install_time
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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 take a closer look at the following
  • 43× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/time-tracker/inc/class-tt-shortcode-show-task-details.php
    • > /wp-content/plugins/time-tracker/inc/class-tt-shortcode-time-log-table.php
    • > /wp-content/plugins/time-tracker/admin/class-tt-sql-result-display-message.php
    • > /wp-content/plugins/time-tracker/admin/class-tt-display-message-check-client-added.php
    • > /wp-content/plugins/time-tracker/inc/class-tt-task-list.php
    • > /wp-content/plugins/time-tracker/inc/class-tt-time-log.php
    • > /wp-content/plugins/time-tracker/inc/class-time-tracker-updater.php
    • > /wp-content/plugins/time-tracker/time-tracker.php
    • > /wp-content/plugins/time-tracker/inc/class-tt-shortcode-open-task-list-table.php
    • > /wp-content/plugins/time-tracker/inc/WPF/class-tt-hook-save-form-data-wpf.php
  • 36× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Logically_Tech\\Time_Tracker\\Inc\\CF7\\add_action() in wp-content/plugins/time-tracker/inc/CF7/function-tt-custom-cf7-field-categories-from-settings.php:17
    • > PHP Warning
      Use of undefined constant TT_HOME - assumed 'TT_HOME' (this will throw an Error in a future version of PHP) in wp-content/plugins/time-tracker/templates/tt-sidebar.php on line 32
    • > PHP Warning
      Use of undefined constant TT_HOME - assumed 'TT_HOME' (this will throw an Error in a future version of PHP) in wp-content/plugins/time-tracker/templates/tt-sidebar.php on line 30
    • > PHP Warning
      Use of undefined constant TT_HOME - assumed 'TT_HOME' (this will throw an Error in a future version of PHP) in wp-content/plugins/time-tracker/templates/tt-sidebar.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Logically_Tech\\Time_Tracker\\Inc\\WPF\\add_action() in wp-content/plugins/time-tracker/inc/WPF/class-time-tracker-wpf-select-fields-dynamic-options.php:181
    • > PHP Warning
      Use of undefined constant TT_HOME - assumed 'TT_HOME' (this will throw an Error in a future version of PHP) in wp-content/plugins/time-tracker/templates/tt-sidebar.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/time-tracker/inc/CF7/function-tt-recaptcha-cf7.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Logically_Tech\\Time_Tracker\\Inc\\add_action() in wp-content/plugins/time-tracker/inc/function-tt-custom-cf7-field-datetime.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Logically_Tech\\Time_Tracker\\Inc\\add_action() in wp-content/plugins/time-tracker/inc/function-tt-custom-cf7-field-project-dropdown.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Logically_Tech\\Time_Tracker\\Inc\\add_action() in wp-content/plugins/time-tracker/inc/function-tt-custom-cf7-field-client-dropdown.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

time-tracker/time-tracker.php Passed 13 tests

The main file in "Time Tracker" v. 3.0.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
140 characters long description:
A task and time tracking program. Perfect for freelancers or indivdiuals keeping track of to do lists and time worked and billed to clients.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin9,234 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP892,1023,8438,686
JavaScript283252548

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.23
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes53
▷ Abstract classes00.00%
▷ Concrete classes53100.00%
▷ Final classes11.89%
Methods407
▷ Static methods12731.20%
▷ Public methods20450.12%
▷ Protected methods20.49%
▷ Private methods20149.39%
Functions129
▷ Named functions129100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/img/recurring-task-icon-150sq-blue.png2.74KB1.34KB▼ 50.95%