84% permissions-security-audit

Code Review | Permissions & Security Audit

WordPress plugin Permissions & Security Audit scored 84% from 54 tests.

About plugin

  • Plugin page: permissions-secur...
  • Plugin version: 1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Jul 22, 2020
  • Latest release: Mar 4, 2021
  • Number of updates: 7
  • Update frequency: every 32.2 days
  • Top authors: innocow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 1,345 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Permissions & Security Audit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.46 ▼8.52
Dashboard /wp-admin3.32 ▲0.0142.47 ▼9.45
Posts /wp-admin/edit.php3.37 ▲0.0147.59 ▼4.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.66 ▼7.84
Media Library /wp-admin/upload.php3.24 ▲0.0134.35 ▼1.85
Permissions & Security Audit /wp-admin/tools.php?page=icwpsa3.3133.81

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Permissions & Security Audit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.20 ▼1.224.91 ▲2.9840.77 ▼8.57
Dashboard /wp-admin2,214 ▲235.86 ▼0.06107.58 ▲7.3039.17 ▼4.74
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0440.49 ▲2.4034.48 ▲1.24
Add New Post /wp-admin/post-new.php1,521 ▼1223.04 ▼0.06583.37 ▼107.0253.74 ▼8.92
Media Library /wp-admin/upload.php1,396 ▲84.20 ▲0.0198.16 ▼7.1247.04 ▲4.95
Permissions & Security Audit /wp-admin/tools.php?page=icwpsa8912.0226.8536.39

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
  • Zombie WordPress options were found after uninstall: 6 options
    • 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 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Security_Audit\\Services\\Audit_Entity' not found in wp-content/plugins/permissions-security-audit/src/services/audit_entity_ownership.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Security_Audit\\Services\\Audit_Entity' not found in wp-content/plugins/permissions-security-audit/src/services/audit_entity_permissions.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Innocow\\Security_Audit\\Services\\Audit_Entity' not found in wp-content/plugins/permissions-security-audit/src/services/audit_entity_folders.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: permission, secure, file, security, permissions...

permissions-security-audit/permissions-security-audit.php 85% from 13 tests

The principal PHP file in "Permissions & Security Audit" v. 1.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 187 characters long)
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected2,655 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP181,2215702,316
JavaScript11030155
PO File1424998
CSS124086

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.88
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods73
▷ Static methods3345.21%
▷ Public methods5778.08%
▷ Protected methods1216.44%
▷ Private methods45.48%
Functions10
▷ Named functions330.00%
▷ Anonymous functions770.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin