84% onzauth

Code Review | OnzAuth

WordPress plugin OnzAuth scored 84% from 54 tests.

About plugin

  • Plugin page: onzauth
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.1-6.1
  • WordPress version: 6.3.1
  • First release: Oct 15, 2022
  • Latest release: Nov 10, 2022
  • Number of updates: 9
  • Update frequency: every 3.0 days
  • Top authors: zailky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.72ms] Passed 4 tests

Server-side resources used by OnzAuth
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.99 ▼3.45
Dashboard /wp-admin3.55 ▲0.2447.65 ▼4.54
Posts /wp-admin/edit.php3.60 ▲0.2447.90 ▼0.11
Add New Post /wp-admin/post-new.php6.06 ▲0.1886.65 ▼10.76
Media Library /wp-admin/upload.php3.41 ▲0.1837.92 ▲2.50
OnzAuth Config /wp-admin/options-general.php?page=onzauth3.3731.30

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 182 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by OnzAuth
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.29 ▼1.092.04 ▲0.3143.92 ▼4.98
Dashboard /wp-admin2,210 ▲254.86 ▼1.0298.60 ▼19.0339.31 ▼12.76
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0433.79 ▼2.3333.82 ▲0.51
Add New Post /wp-admin/post-new.php1,536 ▲2223.15 ▲5.66659.88 ▼41.0666.98 ▲3.32
Media Library /wp-admin/upload.php1,386 ▲44.22 ▼0.0696.82 ▼10.8344.56 ▼2.82
OnzAuth Config /wp-admin/options-general.php?page=onzauth8642.0222.1726.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 49× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\MessageFormatterInterface' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/guzzle/src/MessageFormatter.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/psr7/src/FnStream.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/psr7/src/Uri.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/promises/src/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/psr7/src/LimitStream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/psr7/src/MultipartStream.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/onzauth/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: authentication, passwordless, security, magiclink, biometric...

onzauth/onzauth.php 92% from 13 tests

The main PHP file in "OnzAuth" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected16,681 lines of code in 163 files:
LanguageFilesBlank linesComment linesLines of code
PHP1322,2536,51511,231
Markdown181,40904,164
JSON10001,153
JavaScript210988
CSS16045

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.52
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces12
Interfaces26
Traits3
Classes88
▷ Abstract classes00.00%
▷ Concrete classes88100.00%
▷ Final classes3539.77%
Methods810
▷ Static methods16720.62%
▷ Public methods67383.09%
▷ Protected methods70.86%
▷ Private methods13016.05%
Functions125
▷ Named functions3427.20%
▷ Anonymous functions9172.80%
Constants73
▷ Global constants00.00%
▷ Class constants73100.00%
▷ Public constants5473.97%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.21MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png14.40KB6.57KB▼ 54.36%
assets/banner-1544x500.png101.27KB38.82KB▼ 61.67%
assets/screenshot-2.png42.41KB23.06KB▼ 45.63%
assets/screenshot-1.png6.67KB4.17KB▼ 37.51%
assets/banner-772x250.png41.29KB15.45KB▼ 62.58%