89% wp-rest-api-authentication

Code Review | WordPress REST API Authentication

WordPress plugin WordPress REST API Authentication scored89%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-authe...
  • Plugin version: 3.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: May 9, 2019
  • Latest release: Nov 9, 2023
  • Number of updates: 123
  • Update frequency: every 13.4 days
  • Top authors: cyberlord92 (67.48%)abhiladdha07 (30.08%)yashyadav247 (4.07%)

Code review

54 tests

User reviews

56 reviews

Install metrics

10,000+ active /193,606 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.73MB] [CPU: ▲4.47ms] Passed 4 tests

This is a short check of server-side resources used by WordPress REST API Authentication
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.7847.17 ▲9.19
Dashboard /wp-admin4.06 ▲0.7652.00 ▲0.31
Posts /wp-admin/edit.php4.11 ▲0.7554.98 ▲7.69
Add New Post /wp-admin/post-new.php6.61 ▲0.7299.50 ▲4.92
Media Library /wp-admin/upload.php3.93 ▲0.6941.50 ▲4.95

Server storage [IO: ▲2.84MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 157 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-comments
mo_api_authentication_current_plugin_version
mo_rest_api_protect_migrate
mo_api_authentication_jwt_client_secret
host_name
can_compress_scripts
db_upgraded
theysaidso_admin_options
mo_api_authentication_jwt_signing_algorithm
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by WordPress REST API Authentication
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7014.63 ▲0.281.70 ▼0.0242.94 ▲0.08
Dashboard /wp-admin2,210 ▲325.62 ▼0.0988.93 ▼25.9978.45 ▲32.28
Posts /wp-admin/edit.php2,128 ▲252.03 ▲0.0938.75 ▲0.4335.70 ▼0.26
Add New Post /wp-admin/post-new.php1,551 ▲2523.56 ▲0.30689.84 ▲4.2260.05 ▲8.03
Media Library /wp-admin/upload.php1,427 ▲334.31 ▲0.1295.34 ▼10.7772.19 ▲29.34

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 were found after uninstall: 9 options
    • theysaidso_admin_options
    • db_upgraded
    • mo_api_authentication_jwt_client_secret
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • mo_api_authentication_jwt_signing_algorithm
    • widget_recent-posts
    • mo_rest_api_protect_migrate

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-rest-api-authentication/miniorange-api-authentication.php 85% from 13 tests

Analyzing the main PHP file in "WordPress REST API Authentication" version 3.0.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-rest-api-authentication.php" instead of "miniorange-api-authentication.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

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
No dangerous file extensions were detected33,905 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
CSS77,2151227,787
PHP357401,3055,432
SVG100685
JavaScript1081

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.38
Average class complexity10.11
▷ Minimum class complexity1.00
▷ Maximum class complexity123.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity100.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods91
▷ Static methods4549.45%
▷ Public methods8593.41%
▷ Protected methods00.00%
▷ Private methods66.59%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants1
▷ Global constants1100.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
102 compressed PNG files occupy 0.90MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/api-gateway.png3.96KB2.62KB▼ 33.77%
admin/images/trial.png2.71KB2.83KB0.00%
admin/images/controller.png5.58KB5.96KB0.00%
admin/images/mologo.png12.82KB13.16KB0.00%
admin/images/auth0.png1.69KB1.45KB▼ 14.31%