83% user-access-shortcodes

Code Review | User Access Shortcodes

WordPress plugin User Access Shortcodes scored83%from 54 tests.

About plugin

  • Plugin page: user-access-short...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 22, 2014
  • Latest release: Aug 28, 2023
  • Number of updates: 76
  • Update frequency: every 42.1 days
  • Top authors: spwebguy (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

2,000+ active /19,989 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.31ms] Passed 4 tests

An overview of server-side resources used by User Access Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.06 ▼7.65
Dashboard /wp-admin3.33 ▲0.0243.14 ▼6.37
Posts /wp-admin/edit.php3.38 ▲0.0245.23 ▼9.52
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.09 ▲1.79
Media Library /wp-admin/upload.php3.25 ▲0.0233.71 ▼1.71

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for User Access Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5714.48 ▲0.111.68 ▼0.3839.48 ▼5.73
Dashboard /wp-admin2,209 ▲214.84 ▼0.05111.53 ▲12.1941.28 ▼3.56
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0339.82 ▼0.8735.30 ▼1.73
Add New Post /wp-admin/post-new.php1,536 ▲823.19 ▲5.11663.69 ▲64.4461.93 ▲9.99
Media Library /wp-admin/upload.php1,394 ▲64.21 ▲0.0099.61 ▼2.9645.11 ▼0.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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 no errors were found, 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-access-shortcodes/uasc.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can look at the official readme.txt

user-access-shortcodes/uasc.php 85% from 13 tests

The entry point to "User Access Shortcodes" version 2.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("user-access-shortcodes.php" instead of "uasc.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 308 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin259 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13541158
JavaScript120101

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.56
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/uasc-icon.png3.44KB0.91KB▼ 73.62%