93% check-permission-dialogue

Code Review | Check Permission Dialogue

WordPress plugin Check Permission Dialogue scored 93% from 54 tests.

About plugin

  • Plugin page: check-permission-...
  • Plugin version: 2022.01
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.9
  • WordPress version: 5.9.2
  • First release: Oct 30, 2018
  • Latest release: Jan 28, 2022
  • Number of updates: 14
  • Update frequency: every 84.8 days
  • Top authors: danmz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 582 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼297.31ms] Passed 4 tests

An overview of server-side resources used by Check Permission Dialogue
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1562.32 ▼4.45
Dashboard /wp-admin3.48 ▲0.0836.89 ▼5.62
Posts /wp-admin/edit.php3.70 ▲0.0637.03 ▼5.04
Add New Post /wp-admin/post-new.php7.28 ▲0.3184.36 ▼1,174.12
Media Library /wp-admin/upload.php3.38 ▲0.0929.20 ▲4.82
Permission Dialog /wp-admin/options-general.php?page=chk_perm_dialog3.3128.54

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Check Permission Dialogue
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,904 ▲15915.66 ▼0.095.98 ▼0.762.67 ▲0.45
Dashboard /wp-admin2,887 ▲336.01 ▼0.18115.16 ▼17.38156.08 ▼4.56
Posts /wp-admin/edit.php2,697 ▲63.23 ▼0.0163.93 ▲0.12144.45 ▼6.27
Add New Post /wp-admin/post-new.php1,767 ▲10617.44 ▲1.05438.01 ▲33.49155.56 ▲5.59
Media Library /wp-admin/upload.php1,707 ▲95.56 ▲0.01142.03 ▲1.36187.77 ▼10.69
Permission Dialog /wp-admin/options-general.php?page=chk_perm_dialog1,2452.4254.60159.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/check-permission-dialogue/chk-perm-functions.php
    • > /wp-content/plugins/check-permission-dialogue/chk-perm-dialog-wp.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

check-permission-dialogue/chk-perm-dialog-wp.php 85% from 13 tests

The principal PHP file in "Check Permission Dialogue" v. 2022.01 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("check-permission-dialogue.php" instead of "chk-perm-dialog-wp.php")
  • Description: The description should be shorter than 140 characters (currently 307 characters long)

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 detected1,118 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS236112651
PHP282227463
SVG2004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
PNG images were not found in this plugin