89% permissionsplus

Code Review | Permissions Plus

WordPress plugin Permissions Plus scored89%from 54 tests.

About plugin

  • Plugin page: permissionsplus
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jun 16, 2023
  • Latest release: Jun 16, 2023
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: digbodhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /213 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Permissions Plus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.33 ▼1.31
Dashboard /wp-admin3.31 ▼0.0443.80 ▼13.48
Posts /wp-admin/edit.php3.36 ▲0.0045.08 ▼0.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.78 ▼25.55
Media Library /wp-admin/upload.php3.23 ▲0.0038.35 ▲2.71

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Permissions Plus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.22 ▼1.131.84 ▲0.0737.86 ▼3.18
Dashboard /wp-admin2,209 ▲205.89 ▲0.97110.06 ▲1.3738.94 ▼4.04
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1338.71 ▼0.5034.74 ▼0.89
Add New Post /wp-admin/post-new.php1,546 ▲1723.12 ▲4.81678.21 ▲41.2764.80 ▲6.65
Media Library /wp-admin/upload.php1,391 ▲34.12 ▼0.08107.72 ▲3.9745.17 ▲2.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: admin, custom, roles, permissions, menus

permissionsplus/digitalbodhi-permissionsplus.php 77% from 13 tests

"Permissions Plus" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("permissionsplus.php" instead of "digitalbodhi-permissionsplus.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,359 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP92339691,308
JSON10039
JavaScript1138
CSS1004

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.41
Average class complexity23.50
▷ Minimum class complexity3.00
▷ Maximum class complexity79.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods80
▷ Static methods5467.50%
▷ Public methods6378.75%
▷ Protected methods78.75%
▷ Private methods1012.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants30
▷ Global constants1653.33%
▷ Class constants1446.67%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin