83% fs-disable-users

Code Review | FS Disable Users

WordPress plugin FS Disable Users scored83%from 54 tests.

About plugin

  • Plugin page: fs-disable-users
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2021
  • Latest release: Apr 2, 2023
  • Number of updates: 7
  • Update frequency: every 94.7 days
  • Top authors: fsylum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /756 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by FS Disable Users
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.16 ▼1.52
Dashboard /wp-admin3.33 ▲0.0244.86 ▼6.26
Posts /wp-admin/edit.php3.44 ▲0.0849.18 ▲2.39
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.59 ▼5.47
Media Library /wp-admin/upload.php3.25 ▲0.0229.75 ▼5.35

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

FS Disable Users: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.191.84 ▲0.1140.46 ▼3.23
Dashboard /wp-admin2,203 ▲154.91 ▼1.03108.55 ▼9.8441.87 ▼3.31
Posts /wp-admin/edit.php2,092 ▲32.02 ▼0.0139.38 ▲4.3934.01 ▲0.60
Add New Post /wp-admin/post-new.php1,533 ▲1423.15 ▼0.02629.03 ▼16.9251.51 ▲0.16
Media Library /wp-admin/upload.php1,385 ▼64.25 ▲0.0393.59 ▼4.3739.39 ▼4.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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 | 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
Almost there! Just fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/fs-disable-users/fs-disable-users.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Stream\\Connector' not found in wp-content/plugins/fs-disable-users/src/WP/Stream/Connectors/DisableUsersConnector.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\DisableUsers\\Contracts\\Service' not found in wp-content/plugins/fs-disable-users/src/WP/User.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\DisableUsers\\Contracts\\Service' not found in wp-content/plugins/fs-disable-users/src/WP/Stream/Stream.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\DisableUsers\\Contracts\\Service' not found in wp-content/plugins/fs-disable-users/src/WP/Asset.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\DisableUsers\\Contracts\\Service' not found in wp-content/plugins/fs-disable-users/src/WP/Auth.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: user

fs-disable-users/fs-disable-users.php 77% from 13 tests

The main PHP script in "FS Disable Users" version 1.1.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)
  • Requires PHP: Required version does not match the one declared in readme.txt ("8.0" instead of "7.3")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.9" instead of "5.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin939 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP18222294930
JSON2008
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity11.33
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces1
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods69
▷ Static methods2130.43%
▷ Public methods6695.65%
▷ Protected methods00.00%
▷ Private methods34.35%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants11
▷ Global constants436.36%
▷ Class constants763.64%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin