94% wp-security-audit-log-for-paid-memberships-pro

Code Review | WP Security Audit Log addon for Paid Memberships Pro

WordPress plugin WP Security Audit Log addon for Paid Memberships Pro scored 94% from 53 tests.

About plugin

  • Plugin page: wp-security-audit...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jul 16, 2017
  • Latest release: Jan 22, 2018
  • Number of updates: 12
  • Update frequency: every 16.4 days
  • Top authors: billstotlz (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 892 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WP Security Audit Log addon for Paid Memberships Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.71 ▼0.0123.61 ▼11.54
Dashboard /wp-admin3.06 ▲0.0040.98 ▼4.01
Posts /wp-admin/edit.php3.11 ▲0.0040.00 ▼1.91
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.47 ▼1,029.68
Media Library /wp-admin/upload.php3.00 ▲0.0028.52 ▼2.05

Server storage [IO: ▲0.08MB] [DB: ▲1.00MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WP Security Audit Log addon for Paid Memberships Pro: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,677 ▲7115.79 ▼0.2014.86 ▲6.1250.15 ▲5.78
Dashboard /wp-admin2,934 ▲785.89 ▲0.01134.89 ▼15.76108.44 ▲6.06
Posts /wp-admin/edit.php2,706 ▲32.70 ▲0.0167.70 ▼0.8298.40 ▼3.76
Add New Post /wp-admin/post-new.php1,481 ▲218.50 ▲1.36387.65 ▲23.78117.04 ▲4.68
Media Library /wp-admin/upload.php1,772 ▼04.98 ▼0.03160.58 ▼4.77111.16 ▼5.26

Uninstaller [IO: ▲0.00MB] [DB: ▲1.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WSAL_AbstractSensor' not found in wp-content/plugins/wp-security-audit-log-for-paid-memberships-pro/Sensors/PaidMembershipProHooks.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WSAL_AbstractSensor' not found in wp-content/plugins/wp-security-audit-log-for-paid-memberships-pro/Sensors/UserMetaHooks.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-security-audit-log-for-paid-memberships-pro/wp-security-audit-log-for-paid-memberships-pro.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-security-audit-log-for-paid-memberships-pro/pmpro-alerts.php:4

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 97% 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 need to be fixed:
  • Requires at least: Invalid version format
You can look at the official readme.txt

wp-security-audit-log-for-paid-memberships-pro/wp-security-audit-log-for-paid-memberships-pro.php Passed 13 tests

The main file in "WP Security Audit Log addon for Paid Memberships Pro" v. 1.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
95 characters long description:
an addon to the WP Security Audit Log Plugin to track events in the Paid Memberships Pro plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin704 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP47846704

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity33.00
▷ Minimum class complexity16.00
▷ Maximum class complexity50.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods2696.30%
▷ Protected methods13.70%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected