78% jwt-authenticator

Code Review | JWT Authenticator

WordPress plugin JWT Authenticator scored 78% from 54 tests.

About plugin

  • Plugin page: jwt-authenticator
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: Nov 30, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 5
  • Update frequency: every 1.8 days
  • Top authors: shawnxlw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,108 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.21ms] Passed 4 tests

Analyzing server-side resources used by JWT Authenticator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.11 ▲0.04
Dashboard /wp-admin3.35 ▲0.0554.79 ▲8.69
Posts /wp-admin/edit.php3.46 ▲0.1147.80 ▼3.32
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.54 ▼10.30
Media Library /wp-admin/upload.php3.27 ▲0.0435.26 ▼3.24
JWT Authenticator /wp-admin/options-general.php?page=jwt_authenticator3.2131.97

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by JWT Authenticator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.18 ▼0.852.07 ▼0.1045.36 ▲5.39
Dashboard /wp-admin2,210 ▲194.81 ▼0.09103.96 ▼3.3240.44 ▼1.69
Posts /wp-admin/edit.php2,090 ▲222.00 ▼0.0233.73 ▼1.8733.22 ▼0.81
Add New Post /wp-admin/post-new.php1,551 ▲1618.16 ▼5.06624.09 ▼13.3267.84 ▼2.17
Media Library /wp-admin/upload.php1,395 ▲104.21 ▼0.0698.25 ▼8.8941.72 ▼7.39
JWT Authenticator /wp-admin/options-general.php?page=jwt_authenticator1,0392.0522.4327.54

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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)
These errors were triggered by the plugin
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=jwt_authenticator
    • > Notice in wp-content/plugins/jwt-authenticator/settings.php+275
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/jwt-authenticator/settings.php:303
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jwt-authenticator/auth.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: authentication, sso, token, jwt, user...

jwt-authenticator/settings.php 85% from 13 tests

Analyzing the main PHP file in "JWT Authenticator" version 1.1
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jwt-authenticator.php" instead of "settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected381 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35749381

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods233.33%
▷ Protected methods00.00%
▷ Private methods466.67%
Functions25
▷ Named functions2184.00%
▷ Anonymous functions416.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.39MB with 0.27MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png403.22KB123.88KB▼ 69.28%