84% user-activity

Code Review | User Activity

WordPress plugin User Activity scored84%from 54 tests.

About plugin

  • Plugin page: user-activity
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.2-5.5.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2013
  • Latest release: Oct 14, 2020
  • Number of updates: 12
  • Update frequency: every 229.1 days
  • Top authors: windyjonas (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.76ms] Passed 4 tests

Server-side resources used by User Activity
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0245.70 ▲1.07
Dashboard /wp-admin3.59 ▼0.0450.94 ▼15.10
Posts /wp-admin/edit.php3.71 ▲0.0353.99 ▲0.89
Add New Post /wp-admin/post-new.php6.17 ▲0.0394.69 ▲2.10
Media Library /wp-admin/upload.php3.52 ▲0.0341.20 ▲4.23
User Activity /wp-admin/tools.php?page=user-activity-page3.5438.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for User Activity
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.38 ▼0.001.94 ▼0.0243.07 ▲0.04
Dashboard /wp-admin2,199 ▲215.60 ▼0.1392.08 ▼14.0341.41 ▼3.86
Posts /wp-admin/edit.php2,101 ▲11.99 ▼0.0140.26 ▲2.5736.41 ▲0.33
Add New Post /wp-admin/post-new.php1,529 ▼1617.76 ▼5.31666.77 ▼45.0352.68 ▼12.07
Media Library /wp-admin/upload.php1,398 ▼24.23 ▼0.0198.96 ▼20.7747.99 ▼2.86
User Activity /wp-admin/tools.php?page=user-activity-page1,1301.9041.7740.35

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/user-activity/user-activity.php
    • > /wp-content/plugins/user-activity/classes/class-bu-user-activity-table.php
    • > /wp-content/plugins/user-activity/classes/class-bu-plugin-base.php
    • > /wp-content/plugins/user-activity/classes/class-bu-user-activity.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: list, admin, users

user-activity/user-activity.php Passed 13 tests

"User Activity" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
89 characters long description:
List number of posts per user. You can limit the search by date, post type and user name.

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
There were no executable files found in this plugin286 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP452201281
JavaScript1205

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.38
Average class complexity14.33
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods19
▷ Static methods210.53%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin