84% rs-user-access

Code Review | RS User Access

WordPress plugin RS User Access scored84%from 54 tests.

About plugin

  • Plugin page: rs-user-access
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 8, 2015
  • Latest release: Jul 9, 2015
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: rorystandley (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,048 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.07MB] [CPU: ▼4.63ms] Passed 4 tests

A check of server-side resources used by RS User Access
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.58 ▼3.64
Dashboard /wp-admin3.39 ▲0.0855.36 ▲0.26
Posts /wp-admin/edit.php3.47 ▲0.1150.98 ▼4.98
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.54 ▼10.14
Media Library /wp-admin/upload.php3.31 ▲0.0835.30 ▲0.23

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 31 new files
Database: 1 new table, 7 new options
New tables
wp_rs_admin_pages
New WordPress options
theysaidso_admin_options
rs_admin_pages_db_version
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for RS User Access
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲12713.53 ▼0.708.34 ▲6.5343.89 ▼2.81
Dashboard /wp-admin2,211 ▲315.54 ▼0.1685.66 ▼0.9039.08 ▼6.10
Posts /wp-admin/edit.php2,116 ▲132.03 ▲0.0435.79 ▼8.6036.43 ▼0.14
Add New Post /wp-admin/post-new.php1,559 ▲3323.24 ▲5.62668.09 ▲35.8160.07 ▲1.48
Media Library /wp-admin/upload.php1,419 ▲164.24 ▲0.0397.75 ▼2.7046.11 ▲3.08

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/rs-user-access/admin/views/admin.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

rs-user-access/hide-admin.php 92% from 13 tests

The main file in "RS User Access" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("rs-user-access.php" instead of "hide-admin.php")

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,052 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG100565
PHP7126106372
CSS314563
JavaScript217852

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity27.00
▷ Minimum class complexity11.00
▷ Maximum class complexity43.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods825.81%
▷ Public methods2167.74%
▷ Protected methods00.00%
▷ Private methods1032.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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 were not PNG files found in your plugin