62% activitytime

Code Review | WP Sessions Time Monitoring Full Automatic

WordPress plugin WP Sessions Time Monitoring Full Automatic scored62%from 54 tests.

About plugin

  • Plugin page: activitytime
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 5, 2020
  • Latest release: Oct 4, 2023
  • Number of updates: 22
  • Update frequency: every 47.0 days
  • Top authors: switcorp (95.45%)sanwinter (9.09%)

Code review

54 tests

User reviews

7 reviews

Install metrics

500+ active /4,043 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
Installer ran successfully

Server metrics [RAM: ▲4.98MB] [CPU: ▲24.93ms] 75% from 4 tests

An overview of server-side resources used by WP Sessions Time Monitoring Full Automatic
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,830.29ms on /wp-admin/admin.php?page=activitytime-addons)
PageMemory (MB)CPU Time (ms)
Home /8.99 ▲5.4885.87 ▲43.93
Dashboard /wp-admin27.30 ▲23.914,814,813.69 ▲4,814,746.34
Posts /wp-admin/edit.php9.01 ▲5.6185.78 ▲29.85
Add New Post /wp-admin/post-new.php9.01 ▲3.0875.01 ▼26.01
Media Library /wp-admin/upload.php9.01 ▲5.7488.47 ▲51.95
Sessions activity /wp-admin/admin.php?page=actt_sessions9.0188.37
Current Active /wp-admin/admin.php?page=actt_current_active9.0472.63
By Post Type /wp-admin/admin.php?page=actt_time_by_postacc9.0475.08
Support Forum /wp-admin/admin.php?page=activitytime-wp-support-forum9.0460.01
Upgrade  ➤ /wp-admin/admin.php?page=activitytime-pricing9.0473.88
Contact Us /wp-admin/admin.php?page=activitytime-contact9.0473.77
Time on page /wp-admin/admin.php?page=actt_time_per_pageacc9.0475.61
Add-Ons /wp-admin/admin.php?page=activitytime-addons9.041,830.29
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.0474.95
Analytic Graphs /wp-admin/admin.php?page=activitytime9.0476.35

Server storage [IO: ▲6.25MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 289 new files
Database: 3 new tables, 16 new options
New tables
wp_actt_visited_pages
wp_actt_user_sessions
wp_actt_report
New WordPress options
widget_recent-comments
theysaidso_admin_options
fs_active_plugins
db_upgraded
actt_general_section
fs_debug_mode
widget_recent-posts
winter_mvc_active_plugins
activitytime-menuitems
actt_timeout_mins
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Sessions Time Monitoring Full Automatic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲22214.11 ▼0.189.96 ▲8.3145.49 ▲0.72
Dashboard /wp-admin2,296 ▲1195.89 ▲0.24103.42 ▲13.3046.57 ▲4.17
Posts /wp-admin/edit.php2,206 ▲1062.29 ▲0.3036.53 ▼2.2634.76 ▼4.78
Add New Post /wp-admin/post-new.php1,610 ▲8222.34 ▼0.84705.76 ▼25.2139.12 ▼16.42
Media Library /wp-admin/upload.php1,498 ▲984.42 ▲0.26113.46 ▲6.2552.84 ▲3.31
Sessions activity /wp-admin/admin.php?page=actt_sessions2,1734.71106.0461.49
Current Active /wp-admin/admin.php?page=actt_current_active3,3924.13112.23344.12
By Post Type /wp-admin/admin.php?page=actt_time_by_postacc3,7844.73110.28101.55
Support Forum /wp-admin/admin.php?page=activitytime-wp-support-forum1,5423.9382.3584.71
Upgrade  ➤ /wp-admin/admin.php?page=activitytime-pricing1,7503.3779.1763.01
Contact Us /wp-admin/admin.php?page=activitytime-contact1,6663.4858.6834.12
Time on page /wp-admin/admin.php?page=actt_time_per_pageacc3,5404.1999.07113.68
Add-Ons /wp-admin/admin.php?page=activitytime-addons1,1762.8345.4039.18
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,2252.0529.0832.27
Analytic Graphs /wp-admin/admin.php?page=activitytime1,0342.9335.1335.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 3 tables
    • wp_actt_user_sessions
    • wp_actt_report
    • wp_actt_visited_pages
  • Zombie WordPress options were found after uninstall: 16 options
    • widget_recent-posts
    • actt_general_section
    • widget_theysaidso_widget
    • widget_recent-comments
    • actt_timeout_mins
    • can_compress_scripts
    • db_upgraded
    • fs_active_plugins
    • actt_db_version
    • winter_mvc_active_plugins
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 135 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=activitytime
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 135 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=activitytime
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/activitytime/public/partials/activitytime-public-display.php
    • > /wp-content/plugins/activitytime/application/controllers/Actt_current_active.php
    • > /wp-content/plugins/activitytime/application/controllers/Activitytime.php
    • > /wp-content/plugins/activitytime/application/controllers/Actt_time_per_pageacc.php
    • > /wp-content/plugins/activitytime/application/controllers/Actt_related.php
    • > /wp-content/plugins/activitytime/application/controllers/Actt_sessions.php
    • > /wp-content/plugins/activitytime/admin/partials/activitytime-admin-display.php
    • > /wp-content/plugins/activitytime/application/controllers/Actt_time_by_postacc.php
    • > /wp-content/plugins/activitytime/application/controllers/Actt_time_per_page.php
    • > /wp-content/plugins/activitytime/application/controllers/Actt_contact_us.php
  • 12× 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/activitytime/application/views/actt_time_per_pageacc/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/activitytime/application/views/actt_sessions/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/activitytime/vendor/Winter_MVC/init.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/activitytime/application/views/actt_time_by_post_pageacc/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/activitytime/shortcodes/actt_time_page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/activitytime/application/views/activitytime/index.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/activitytime/application/views/actt_current_active/index.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CI_Model' not found in wp-content/plugins/activitytime/application/core/MY_Model.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function echo_js() in wp-content/plugins/activitytime/application/views/general/footer.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/activitytime/application/views/actt_related/index.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Sessions time and time per page analytics graphs), #2 (Activity time tracking per page), #3 (Activity time tracking per session), #4 (Activity time By Post Type)
You can take inspiration from this readme.txt

activitytime/activitytime.php 92% from 13 tests

"WP Sessions Time Monitoring Full Automatic" version 1.0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 164 characters long)

Code Analysis 97% from 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
There were no executable files found in this plugin55,414 lines of code in 217 files:
LanguageFilesBlank linesComment linesLines of code
PHP16610,64719,23841,753
CSS271,004726,719
JavaScript168068393,036
SVG2002,959
Markdown2820405
PO File2158280369
Sass1360164
HTML1209

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity65.58
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.37
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes77
▷ Abstract classes22.60%
▷ Concrete classes7597.40%
▷ Final classes00.00%
Methods1,502
▷ Static methods20213.45%
▷ Public methods1,09973.17%
▷ Protected methods231.53%
▷ Private methods38025.30%
Functions203
▷ Named functions20098.52%
▷ Anonymous functions31.48%
Constants152
▷ Global constants10569.08%
▷ Class constants4730.92%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/details_close.png0.67KB0.79KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
screenshot-4.png81.11KB37.32KB▼ 53.99%
admin/img/details_open.png0.69KB0.80KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%