84% network-restricted-members

Code Review | Network Restricted Members

WordPress plugin Network Restricted Members scored84%from 54 tests.

About plugin

  • Plugin page: network-restricte...
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Oct 30, 2014
  • Latest release: Feb 14, 2016
  • Number of updates: 12
  • Update frequency: every 39.3 days
  • Top authors: goblindegook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,567 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
Install script ran successfully

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

A check of server-side resources used by Network Restricted Members
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.78 ▼1.98
Dashboard /wp-admin3.34 ▲0.0344.79 ▼5.88
Posts /wp-admin/edit.php3.39 ▲0.0348.82 ▼0.07
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.91 ▼18.85
Media Library /wp-admin/upload.php3.26 ▲0.0335.63 ▲3.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Network Restricted Members
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.60 ▼0.831.78 ▲0.0539.65 ▼3.34
Dashboard /wp-admin2,206 ▲154.85 ▼1.05107.41 ▲5.1938.79 ▼2.46
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0240.37 ▲3.8434.20 ▼1.98
Add New Post /wp-admin/post-new.php1,514 ▼023.45 ▲5.98689.99 ▲38.7565.39 ▲9.06
Media Library /wp-admin/upload.php1,388 ▼04.25 ▲0.04114.14 ▼1.8042.53 ▼3.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/network-restricted-members/network-restricted-members.php:287

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
6 plugin tags: membership, multisite, user management, access control, users...

network-restricted-members/network-restricted-members.php Passed 13 tests

"Network Restricted Members" version 0.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Restrict user access to selected sites on open multisite networks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin145 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24895145

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods220.00%
▷ Public methods990.00%
▷ Protected methods110.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
No PNG files were detected