84% wp-post-acl

Code Review | WP Post ACL

WordPress plugin WP Post ACL scored84%from 54 tests.

About plugin

  • Plugin page: wp-post-acl
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.1
  • WordPress version: 6.3.1
  • First release: Mar 2, 2016
  • Latest release: Jul 6, 2016
  • Number of updates: 8
  • Update frequency: every 64.9 days
  • Top authors: Zuige (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /978 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.70ms] Passed 4 tests

Server-side resources used by WP Post ACL
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.75 ▲2.02
Dashboard /wp-admin3.32 ▼0.0347.38 ▼11.32
Posts /wp-admin/edit.php3.37 ▲0.0142.59 ▼4.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.98 ▼12.91
Media Library /wp-admin/upload.php3.24 ▲0.0135.86 ▲4.44

Server storage [IO: ▲0.49MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

WP Post ACL: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.74 ▲0.361.96 ▲0.3443.41 ▲0.02
Dashboard /wp-admin2,206 ▲544.86 ▼0.75101.03 ▲2.1638.70 ▲1.38
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0435.23 ▼1.2735.40 ▲0.66
Add New Post /wp-admin/post-new.php6,229 ▲4,71018.78 ▼4.39875.29 ▲214.7459.60 ▲1.90
Media Library /wp-admin/upload.php1,388 ▼34.23 ▲0.0196.44 ▼3.5043.00 ▼2.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 fix 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 add_filter() in wp-content/plugins/wp-post-acl/wp-post-acl.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
9 plugin tags: allow, post, editor, restrict, permissions...

wp-post-acl/wp-post-acl.php Passed 13 tests

The entry point to "WP Post ACL" version 1.0.1 is a PHP file that has certain tags in its header comment area
51 characters long description:
A simple way to control who can edit posts or pages

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
Good job! No executable or dangerous file extensions detected525 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP8104217441
PO File18841
Markdown117029
JSON20014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity19.75
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods33
▷ Static methods618.18%
▷ Public methods3090.91%
▷ Protected methods00.00%
▷ Private methods39.09%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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
5 PNG files occupy 0.43MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png8.89KB5.54KB▼ 37.74%
assets/banner-1544x500.png23.59KB9.86KB▼ 58.20%
assets/screenshot-1.png363.62KB116.39KB▼ 67.99%
assets/icon-256x256.png24.65KB17.37KB▼ 29.54%
assets/banner-772x250.png17.45KB8.79KB▼ 49.62%