84% activity-log-memberpress

Code Review | Activity Log for MemberPress

WordPress plugin Activity Log for MemberPress scored84%from 54 tests.

About plugin

  • Plugin page: activity-log-memb...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 8
  • Update frequency: every 38.0 days
  • Top authors: WPWhiteSecurity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,229 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by Activity Log for MemberPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.14 ▲1.80
Dashboard /wp-admin3.41 ▲0.0755.78 ▼4.97
Posts /wp-admin/edit.php3.53 ▲0.1748.81 ▲1.32
Add New Post /wp-admin/post-new.php6.02 ▲0.1291.73 ▲0.92
Media Library /wp-admin/upload.php3.34 ▲0.1136.21 ▲1.25

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Activity Log for MemberPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.19 ▼1.091.70 ▲0.0943.33 ▲2.45
Dashboard /wp-admin2,228 ▲405.86 ▼0.00100.22 ▼4.2339.89 ▼3.20
Posts /wp-admin/edit.php2,111 ▲222.04 ▼0.0141.12 ▲7.9136.13 ▼2.33
Add New Post /wp-admin/post-new.php1,545 ▲2623.06 ▲0.09645.95 ▲43.6855.72 ▲3.22
Media Library /wp-admin/upload.php1,410 ▲224.21 ▲0.0194.15 ▼1.4844.76 ▲0.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/activity-log-memberpress/includes/wsal-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WSAL_AbstractSensor' not found in wp-content/plugins/activity-log-memberpress/wp-security-audit-log/custom-sensors/WSAL_Sensors_MemberPress.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/activity-log-memberpress/wp-security-audit-log/custom-alerts.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/activity-log-memberpress/wsal-memberpress.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: activity log for memberpress, activity logs, wp activity log extension

activity-log-memberpress/wsal-memberpress.php 85% from 13 tests

Analyzing the main PHP file in "Activity Log for MemberPress" version 1.1.0
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("activity-log-memberpress.php" instead of "wsal-memberpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,786 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP93477902,714
JavaScript13272

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity62.40
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods71
▷ Static methods2839.44%
▷ Public methods6794.37%
▷ Protected methods00.00%
▷ Private methods45.63%
Functions10
▷ Named functions440.00%
▷ Anonymous functions660.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin