84% agentpress-permissions

Code Review | AgentPress Permissions

WordPress plugin AgentPress Permissions scored84%from 54 tests.

About plugin

  • Plugin page: agentpress-permis...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 7, 2014
  • Latest release: Jul 9, 2016
  • Number of updates: 10
  • Update frequency: every 88.3 days
  • Top authors: nickciske (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,103 total downloads

Benchmarks

Plugin footprint 83% from 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.02MB] [CPU: ▼8.73ms] Passed 4 tests

A check of server-side resources used by AgentPress Permissions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.98 ▼3.80
Dashboard /wp-admin3.34 ▼0.0041.45 ▼14.49
Posts /wp-admin/edit.php3.39 ▲0.0446.66 ▲1.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.91 ▼17.03
Media Library /wp-admin/upload.php3.26 ▲0.0333.48 ▲0.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for AgentPress Permissions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▲0.031.58 ▼0.3740.68 ▼3.02
Dashboard /wp-admin2,192 ▲125.55 ▼0.0580.50 ▼5.5539.54 ▲4.62
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0138.32 ▼0.6337.48 ▲0.55
Add New Post /wp-admin/post-new.php1,526 ▼022.88 ▼0.63607.13 ▼40.9857.61 ▲8.66
Media Library /wp-admin/upload.php1,400 ▲64.19 ▲0.0193.00 ▼7.1241.93 ▲0.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | 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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/agentpress-permissions/agentpress-permissions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/agentpress-permissions/trunk/agentpress-permissions.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === agentpress-permissions === )
You can look at the official readme.txt

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

The primary PHP file in "AgentPress Permissions" version 1.0.1 is used by WordPress to initiate all plugin functionality
41 characters long description:
Enable custom capabilities for AgentPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin44 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141444

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions4
▷ Named functions4100.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