93% administrator-access-to-pmpro-protected-content

Code Review | Administrator Access to PMPro Protected Content

WordPress plugin Administrator Access to PMPro Protected Content scored 93% from 54 tests.

About plugin

  • Plugin page: administrator-acc...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5.1
  • WordPress version: 5.8.1
  • First release: Sep 25, 2018
  • Latest release: Sep 16, 2020
  • Number of updates: 9
  • Update frequency: every 80.9 days
  • Top authors: eighty20results (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,074 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Administrator Access to PMPro Protected Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0238.67 ▲1.27
Dashboard /wp-admin3.08 ▲0.0247.31 ▲3.22
Posts /wp-admin/edit.php3.13 ▲0.0241.88 ▼2.31
Add New Post /wp-admin/post-new.php5.43 ▲0.0091.59 ▼579.04
Media Library /wp-admin/upload.php3.02 ▲0.0230.24 ▼6.24

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Administrator Access to PMPro Protected Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10716.30 ▲0.698.49 ▼0.7949.10 ▼4.24
Dashboard /wp-admin2,967 ▲305.88 ▼0.08143.09 ▼9.90125.95 ▲5.80
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0269.24 ▼5.0390.35 ▼8.86
Add New Post /wp-admin/post-new.php1,683 ▲1118.80 ▼0.26390.25 ▲6.39115.67 ▲2.51
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.01158.51 ▼4.92123.67 ▼6.90

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

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

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function E20R\\PMPro\\Access_Rights\\add_action() in wp-content/plugins/administrator-access-to-pmpro-protected-content/class-adminOverride.php:153

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

administrator-access-to-pmpro-protected-content/class-adminOverride.php 85% from 13 tests

The main file in "Administrator Access to PMPro Protected Content" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 188 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("administrator-access-to-pmpro-protected-content.php" instead of "class-adminOverride.php")

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
Everything looks great! No dangerous files found in this plugin45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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 are no PNG files in this plugin