83% simple-user-locking

Code Review | Simple User Locking

WordPress plugin Simple User Locking scored83%from 54 tests.

About plugin

  • Plugin page: simple-user-locking
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2019
  • Latest release: Jul 4, 2019
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: Blackbam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /623 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.06MB] [CPU: ▼12.90ms] Passed 4 tests

An overview of server-side resources used by Simple User Locking
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0833.47 ▼10.64
Dashboard /wp-admin3.38 ▲0.0342.63 ▼18.20
Posts /wp-admin/edit.php3.49 ▲0.1347.19 ▲0.35
Add New Post /wp-admin/post-new.php5.96 ▲0.0776.38 ▼18.47
Media Library /wp-admin/upload.php3.30 ▲0.0732.85 ▼4.29

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simple User Locking
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.131.77 ▲0.0937.82 ▼6.08
Dashboard /wp-admin2,195 ▲185.58 ▼0.0493.74 ▲5.0043.59 ▲4.99
Posts /wp-admin/edit.php2,100 ▼02.14 ▲0.1339.35 ▲1.7036.09 ▲0.65
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▼0.09681.60 ▲1.6065.45 ▲4.88
Media Library /wp-admin/upload.php1,397 ▼64.31 ▲0.1493.24 ▼19.0741.56 ▼4.02

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

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

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× 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/simple-user-locking/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/simple-user-locking/simple-user-locking.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: authentication, administrator, moderation, multisite, network...

simple-user-locking/simple-user-locking.php 77% from 13 tests

The entry point to "Simple User Locking" version 1.0.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 183 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "4.9")

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
Everything looks great! No dangerous files found in this plugin321 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP56966303
CSS13013
JavaScript1205

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1168.75%
▷ Anonymous functions531.25%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin