10% activity-log-mainwp

Code Review | Activity Log For MainWP

WordPress plugin Activity Log For MainWP scored10%from 54 tests.

About plugin

  • Plugin page: activity-log-mainwp
  • Plugin version: 2.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 15, 2018
  • Latest release: Sep 30, 2023
  • Number of updates: 83
  • Update frequency: every 21.6 days
  • Top authors: WPWhiteSecurity (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /50,489 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/mainwp/mainwp.php): failed to open stream: No such file or directory

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

A check of server-side resources used by Activity Log For MainWP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.92 ▼3.00
Dashboard /wp-admin3.31 ▲0.0050.33 ▼0.08
Posts /wp-admin/edit.php3.36 ▲0.0051.84 ▼1.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.13 ▼7.90
Media Library /wp-admin/upload.php3.23 ▲0.0038.65 ▲3.14

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

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

Browser metrics Passed 4 tests

Activity Log For MainWP: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.371.83 ▲0.0040.96 ▼6.22
Dashboard /wp-admin2,203 ▲116.00 ▲1.0997.51 ▼9.2439.85 ▼3.18
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0435.34 ▼5.8133.35 ▼3.99
Add New Post /wp-admin/post-new.php1,514 ▼1917.71 ▼5.29666.74 ▼33.2060.02 ▲5.91
Media Library /wp-admin/upload.php1,388 ▲64.22 ▼0.01101.28 ▼0.4446.08 ▲1.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/activity-log-mainwp/extensions/reports/download.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/activity-log-mainwp/vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WSAL\\MainWPExtension\\Enforce_Settings_Background_Process' not found in wp-content/plugins/activity-log-mainwp/includes/processes/class-enforce-settings-removal-process.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/activity-log-mainwp/includes/processes/class-enforce-settings-background-process.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WSAL\\MainWPExtension\\Enforce_Settings_Background_Process' not found in wp-content/plugins/activity-log-mainwp/includes/processes/class-enforce-settings-update-process.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WSAL\\MainWPExtension\\Views\\AuditLogView' not found in wp-content/plugins/activity-log-mainwp/includes/views/class-auditloglistview.php:20
    • > [MWPAL Reporting Plugin] Requesting download.php with a missing or invalid nonce [code
      1000]
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/activity-log-mainwp/vendor/deliciousbrains/wp-background-processing/wp-background-processing.php:20
    • > [MWPAL Reporting Plugin] Requesting download.php without the "f" parameter [code
      2000]

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: Add an image for screenshot #4 (Once you install the plugin you are greeted with a one-time setup wizard.)
You can take inspiration from this readme.txt

activity-log-mainwp/activity-log-mainwp.php 92% from 13 tests

The main file in "Activity Log For MainWP" v. 2.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected25,006 lines of code in 130 files:
LanguageFilesBlank linesComment linesLines of code
PHP1033,3847,44018,229
JavaScript101,0318484,853
CSS8341681,637
Markdown1600112
SVG505110
JSON30065

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity26.10
▷ Minimum class complexity1.00
▷ Maximum class complexity420.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces16
Interfaces5
Traits0
Classes88
▷ Abstract classes1415.91%
▷ Concrete classes7484.09%
▷ Final classes34.05%
Methods817
▷ Static methods597.22%
▷ Public methods66481.27%
▷ Protected methods9311.38%
▷ Private methods607.34%
Functions37
▷ Named functions2875.68%
▷ Anonymous functions924.32%
Constants33
▷ Global constants2678.79%
▷ Class constants721.21%
▷ Public constants7100.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
6 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/wsal-logo-full@2x.png34.26KB10.92KB▼ 68.14%
assets/js/dist/select2/select2.png0.60KB0.99KB0.00%
assets/img/wsal-logo@2x.png10.54KB4.05KB▼ 61.54%
assets/img/wsal-logo-full.png15.85KB5.82KB▼ 63.31%
assets/js/dist/select2/select2x2.png0.83KB0.77KB▼ 6.15%