83% registration-password

Code Review | FS Registration Password

WordPress plugin FS Registration Password scored83%from 54 tests.

About plugin

  • Plugin page: registration-pass...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2021
  • Latest release: Apr 2, 2023
  • Number of updates: 5
  • Update frequency: every 131.4 days
  • Top authors: fsylum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /534 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.24ms] Passed 4 tests

Analyzing server-side resources used by FS Registration Password
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0846.93 ▲11.49
Dashboard /wp-admin3.38 ▲0.0348.40 ▼11.04
Posts /wp-admin/edit.php3.49 ▲0.1445.82 ▲0.24
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.46 ▼8.48
Media Library /wp-admin/upload.php3.30 ▲0.0736.54 ▲2.34

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for FS Registration Password
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.341.81 ▲0.1844.21 ▲1.67
Dashboard /wp-admin2,198 ▲175.57 ▼0.1196.09 ▼3.5342.30 ▼0.75
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0836.53 ▼1.6435.47 ▼1.73
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▼0.34631.05 ▼60.6154.37 ▲2.57
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0197.17 ▼9.5542.48 ▼2.39

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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 untrailingslashit() in wp-content/plugins/registration-password/fs-registration-password.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Fsylum\\RegistrationPassword\\Contracts\\Runnable' not found in wp-content/plugins/registration-password/src/WP/Auth.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: user, register, password, registration

registration-password/fs-registration-password.php 77% from 13 tests

"FS Registration Password" version 1.0.1'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:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("8.0" instead of "7.3")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.9" instead of "5.6")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("registration-password.php" instead of "fs-registration-password.php")

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 plugin671 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP13156292666
JSON1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods49
▷ Static methods1836.73%
▷ Public methods4795.92%
▷ Protected methods00.00%
▷ Private methods24.08%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin