68% simple-permissions

Code Review | Simple Permissions

WordPress plugin Simple Permissions scored 68% from 54 tests.

About plugin

  • Plugin page: simple-permissions
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 24, 2014
  • Latest release: Feb 16, 2016
  • Number of updates: 23
  • Update frequency: every 28.8 days
  • Top authors: george_michael (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,793 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.81MB] [CPU: ▼33.84ms] Passed 4 tests

A check of server-side resources used by Simple Permissions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1637.37 ▼5.94
Dashboard /wp-admin3.13 ▼0.1824.83 ▼28.79
Posts /wp-admin/edit.php3.13 ▼0.2326.53 ▼25.37
Add New Post /wp-admin/post-new.php3.13 ▼2.7625.00 ▼71.10
Media Library /wp-admin/upload.php3.13 ▼0.1023.94 ▼10.10

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
SimplePermissionsAdminOptions
widget_recent-comments

Browser metrics Passed 4 tests

Simple Permissions: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.25 ▼1.121.62 ▼0.7539.31 ▼12.97
Dashboard /wp-admin2,210 ▲224.87 ▼0.02102.48 ▼14.7538.92 ▼9.77
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0139.74 ▲2.6336.20 ▲1.77
Add New Post /wp-admin/post-new.php6,521 ▲4,98720.22 ▼2.82892.82 ▲264.6161.66 ▼2.88
Media Library /wp-admin/upload.php1,392 ▲74.20 ▲0.0295.41 ▼6.0341.71 ▼1.93
Simple Permissions /wp-admin/simple-permissions.php260.440.1313.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • SimplePermissionsAdminOptions
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-permissions/simple-permissions.php:48

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/simple-permissions.php
    • > Network (severe)
    wp-admin/simple-permissions.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There were no tags found
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-permissions === )
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

simple-permissions/simple-permissions.php Passed 13 tests

The main file in "Simple Permissions" v. 1.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
61 characters long description:
Create simple permission groups for reading or editing posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected755 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16896755

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity141.00
▷ Minimum class complexity141.00
▷ Maximum class complexity141.00
Average method complexity9.75
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin