84% simple-jwt-login

Code Review | Simple JWT Login - Login and Register to WordPress using JWT

WordPress plugin Simple JWT Login - Login and Register to WordPress using JWT scored84%from 54 tests.

About plugin

  • Plugin page: simple-jwt-login
  • Plugin version: 3.5.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 14, 2019
  • Latest release: Nov 16, 2023
  • Number of updates: 89
  • Update frequency: every 18.2 days
  • Top authors: nicu_m (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

2,000+ active /40,062 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.39ms] Passed 4 tests

Analyzing server-side resources used by Simple JWT Login - Login and Register to WordPress using JWT
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.73 ▼0.94
Dashboard /wp-admin3.36 ▲0.0544.32 ▼6.69
Posts /wp-admin/edit.php3.41 ▲0.0551.92 ▲8.41
Add New Post /wp-admin/post-new.php6.35 ▲0.4594.50 ▲0.28
Media Library /wp-admin/upload.php3.29 ▲0.0533.54 ▼2.22

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

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

Browser metrics Passed 4 tests

Simple JWT Login - Login and Register to WordPress using JWT: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4314.25 ▼0.041.80 ▼0.0641.10 ▼3.77
Dashboard /wp-admin2,207 ▲335.49 ▼0.1191.76 ▼4.1086.21 ▲39.57
Posts /wp-admin/edit.php2,118 ▲181.97 ▲0.0239.66 ▲1.6534.43 ▼1.63
Add New Post /wp-admin/post-new.php1,556 ▲3023.39 ▲0.44684.80 ▲6.7353.79 ▼8.82
Media Library /wp-admin/upload.php1,418 ▲184.12 ▼0.0496.28 ▼12.2566.66 ▲16.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 26× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Services\\BaseService' not found in wp-content/plugins/simple-jwt-login/src/Services/RegisterUserService.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Modules\\Settings\\BaseSettings' not found in wp-content/plugins/simple-jwt-login/src/Modules/Settings/CorsSettings.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Services\\BaseService' not found in wp-content/plugins/simple-jwt-login/src/Services/RouteService.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Services\\AuthenticateService' not found in wp-content/plugins/simple-jwt-login/src/Services/ValidateTokenService.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Modules\\Settings\\BaseSettings' not found in wp-content/plugins/simple-jwt-login/src/Modules/Settings/ResetPasswordSettings.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Modules\\Settings\\BaseSettings' not found in wp-content/plugins/simple-jwt-login/src/Modules/Settings/AuthenticationSettings.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleJWTLogin\\Modules\\WordPressDataInterface' not found in wp-content/plugins/simple-jwt-login/src/Modules/WordPressData.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Services\\BaseService' not found in wp-content/plugins/simple-jwt-login/src/Services/AuthenticateService.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Services\\BaseService' not found in wp-content/plugins/simple-jwt-login/src/Services/DeleteUserService.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleJWTLogin\\Services\\BaseService' not found in wp-content/plugins/simple-jwt-login/src/Services/LoginService.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
10 plugin tags: tokens, protect, rest, auto login, generate jwt...

simple-jwt-login/simple-jwt-login.php Passed 13 tests

The main PHP script in "Simple JWT Login - Login and Register to WordPress using JWT" version 3.5.3 is automatically included on every request by WordPress
88 characters long description:
Simple-JWT-Login REST API Plugin. Allows you to login / register to WordPress using JWT.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin9,582 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP619551,4908,555
Markdown11720509
CSS23830210
JavaScript2298210
SVG53098

PHP code Passed 2 tests

This is a very shot review of 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 complexity13.42
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces8
Interfaces4
Traits0
Classes41
▷ Abstract classes24.88%
▷ Concrete classes3995.12%
▷ Final classes00.00%
Methods321
▷ Static methods237.17%
▷ Public methods26883.49%
▷ Protected methods113.43%
▷ Private methods4213.08%
Functions16
▷ Named functions743.75%
▷ Anonymous functions956.25%
Constants187
▷ Global constants00.00%
▷ Class constants187100.00%
▷ Public constants187100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/simple-jwt-login-16x16.png0.48KB0.46KB▼ 4.24%