84% registered-users-only

Code Review | Registered Users Only

WordPress plugin Registered Users Only scored84%from 54 tests.

About plugin

  • Plugin page: registered-users-...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.3
  • WordPress version: 6.3.1
  • First release: Apr 12, 2008
  • Latest release: Aug 10, 2023
  • Number of updates: 22
  • Update frequency: every 254.5 days
  • Top authors: Viper007Bond (81.82%)aaronfc (13.64%)alexsanford1 (9.09%)renathoc (9.09%)

Code review

54 tests

User reviews

13 reviews

Install metrics

2,000+ active /115,184 total downloads

Benchmarks

Plugin footprint 83% from 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.68ms] Passed 4 tests

Server-side resources used by Registered Users Only
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.15 ▲1.97
Dashboard /wp-admin3.34 ▲0.0343.55 ▼2.91
Posts /wp-admin/edit.php3.39 ▲0.0347.91 ▼2.74
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.95 ▼11.03
Media Library /wp-admin/upload.php3.26 ▲0.0352.51 ▲14.31
Registered Only /wp-admin/options-general.php?page=registered-users-only3.2332.87

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Registered Users Only
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.22 ▼0.995.10 ▲3.4038.61 ▼7.54
Dashboard /wp-admin2,213 ▲255.88 ▼0.0198.69 ▼2.9542.48 ▲1.53
Posts /wp-admin/edit.php2,096 ▲42.04 ▼0.0138.96 ▼3.4732.19 ▼2.46
Add New Post /wp-admin/post-new.php1,533 ▼018.17 ▼5.12625.87 ▲0.4052.75 ▼0.34
Media Library /wp-admin/upload.php1,389 ▲44.20 ▼0.01104.49 ▼9.4143.29 ▼5.10
Registered Only /wp-admin/options-general.php?page=registered-users-only8182.0324.2227.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 add_action() in wp-content/plugins/registered-users-only/registered-users-only.php:240

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: registration, registered only, restriction

registered-users-only/registered-users-only.php 92% from 13 tests

"Registered Users Only" version 1.3.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 185 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin149 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14645149

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected