71% psw-login-and-registration

Code Review | PSW - Login and registration

WordPress plugin PSW - Login and registration scored 71% from 54 tests.

About plugin

  • Plugin page: psw-login-and-reg...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2022
  • Latest release: Sep 13, 2023
  • Number of updates: 11
  • Update frequency: every 28.5 days
  • Top authors: empoweringprowebsite (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 828 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
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.80ms] Passed 4 tests

Server-side resources used by PSW - Login and registration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.30 ▼3.06
Dashboard /wp-admin3.47 ▲0.1647.30 ▼2.41
Posts /wp-admin/edit.php3.58 ▲0.2348.08 ▼4.72
Add New Post /wp-admin/post-new.php6.07 ▲0.1895.20 ▲9.37
Media Library /wp-admin/upload.php3.39 ▲0.1635.04 ▲2.99
PSW - Front-end Login and registration /wp-admin/options-general.php?page=psw-general-features3.3631.39

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

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

Browser metrics Passed 4 tests

PSW - Login and registration: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.24 ▼0.781.88 ▼0.6742.05 ▼6.18
Dashboard /wp-admin2,217 ▲294.85 ▼0.22105.02 ▼15.9743.51 ▼4.39
Posts /wp-admin/edit.php2,097 ▲52.03 ▼0.0438.72 ▼6.3830.27 ▼10.25
Add New Post /wp-admin/post-new.php1,521 ▼723.36 ▲5.06583.94 ▼61.1060.98 ▲7.69
Media Library /wp-admin/upload.php1,399 ▲114.22 ▲0.0697.15 ▼11.7842.35 ▼2.01
PSW - Front-end Login and registration /wp-admin/options-general.php?page=psw-general-features8792.0622.2742.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=psw-general-features
    • > Notice in wp-content/plugins/psw-login-and-registration/admin/plugin_setting.php+144
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/psw-login-and-registration/public/partials/prositegeneralfeatures-public-display.php
    • > /wp-content/plugins/psw-login-and-registration/admin/partials/prositegeneralfeatures-admin-display.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/psw-login-and-registration/public/templates/page-template.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/psw-login-and-registration/public/partials/part/register.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_queried_object() in wp-content/plugins/psw-login-and-registration/public/partials/part/login.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/psw-login-and-registration/public/partials/registration_form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/psw-login-and-registration/public/partials/part/forget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/psw-login-and-registration/admin/plugin_setting.php:166

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 73% from 29 tests

readme.txt 69% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin tags were not defined
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === psw-login-and-registration === )
  • Contributors: The plugin contributors field is not present
  • Screenshots: These screenshots need descriptions #5, #6 in psw-login-and-registration/assets to your readme.txt
  • Tags: The plugin tags were not defined
The official readme.txt might help

psw-login-and-registration/prositegeneralfeatures.php 77% from 13 tests

Analyzing the main PHP file in "PSW - Login and registration" version 1.0.4
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("psw-login-and-registration.php" instead of "prositegeneralfeatures.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)

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
No dangerous file extensions were detected1,546 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP18189574741
PO File2164181401
CSS21312242
JavaScript21628162

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.75
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods24.35%
▷ Public methods4189.13%
▷ Protected methods00.00%
▷ Private methods510.87%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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