79% logtivity

Code Review | Error Log Monitor, Activity Logs, User Activity Tracking from Logtivity

WordPress plugin Error Log Monitor, Activity Logs, User Activity Tracking from Logtivity scored79%from 54 tests.

About plugin

  • Plugin page: logtivity
  • Plugin version: 3.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Mar 10, 2021
  • Latest release: Nov 11, 2023
  • Number of updates: 86
  • Update frequency: every 11.4 days
  • Top authors: logtivity (72.09%)stevejburge (29.07%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /8,781 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▼5.47ms] Passed 4 tests

An overview of server-side resources used by Error Log Monitor, Activity Logs, User Activity Tracking from Logtivity
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5243.10 ▲4.89
Dashboard /wp-admin3.83 ▲0.4851.32 ▼9.12
Posts /wp-admin/edit.php3.88 ▲0.5245.36 ▼4.97
Add New Post /wp-admin/post-new.php6.43 ▲0.5484.91 ▼11.09
Media Library /wp-admin/upload.php3.75 ▲0.5239.98 ▲3.31
Logtivity /wp-admin/admin.php?page=logtivity3.7740.32
Settings /wp-admin/admin.php?page=logtivity-settings3.7938.26

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
logtivity_last_settings_check_in_at

Browser metrics Passed 4 tests

Checking browser requirements for Error Log Monitor, Activity Logs, User Activity Tracking from Logtivity
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲19414.32 ▼0.091.59 ▲0.0742.47 ▲2.42
Dashboard /wp-admin2,222 ▲485.51 ▼0.1185.78 ▼6.1138.59 ▼6.95
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0136.54 ▼1.6729.84 ▼6.37
Add New Post /wp-admin/post-new.php1,549 ▲2323.33 ▲0.62684.29 ▲3.5349.74 ▼1.06
Media Library /wp-admin/upload.php1,427 ▲364.24 ▲0.05102.34 ▼1.3341.45 ▼2.97
Logtivity /wp-admin/admin.php?page=logtivity1,0781.8332.9225.82
Settings /wp-admin/admin.php?page=logtivity-settings1,1572.0227.8427.18

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • logtivity_last_settings_check_in_at
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/logtivity/views/_logs-loop.php
  • 37× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/logtivity/views/site-url-changed-notice.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Logtivity_Api' not found in wp-content/plugins/logtivity/Services/Logtivity_Logger.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logtivity/Logs/Code_Snippets/Logtivity_Code_Snippets.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Logtivity_Abstract_Easy_Digital_Downloads' not found in wp-content/plugins/logtivity/Logs/Easy_Digital_Downloads/Logtivity_Easy_Digital_Downloads_Software_Licensing.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Logtivity_Abstract_Logger' not found in wp-content/plugins/logtivity/Logs/Memberpress/Logtivity_Memberpress.php:3
    • > PHP Notice
      Undefined variable: logs in wp-content/plugins/logtivity/views/_logs-loop.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/logtivity/views/activation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function logtivity_view() in wp-content/plugins/logtivity/views/log-index.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logtivity/Services/Logtivity_Check_For_Disabled_Individual_Logs.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function logtivity_view() in wp-content/plugins/logtivity/views/settings.php:1

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: activity logs, site activities, event monitoring, log data, activity log...

logtivity/logtivity.php Passed 13 tests

This is the main PHP file of "Error Log Monitor, Activity Logs, User Activity Tracking from Logtivity" version 3.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Dedicated Event Monitoring for WordPress using Logtivity.io.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,495 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP469164793,928
Markdown12020317
JavaScript1705113
CSS10087
SVG10050

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity14.23
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes34
▷ Abstract classes25.88%
▷ Concrete classes3294.12%
▷ Final classes00.00%
Methods265
▷ Static methods41.51%
▷ Public methods22785.66%
▷ Protected methods155.66%
▷ Private methods238.68%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
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
No PNG files were detected