94% application-passwords

Code Review | Application Passwords

WordPress plugin Application Passwords scored 94% from 54 tests.

About plugin

  • Plugin page: application-passw...
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.5
  • WordPress version: 5.8.1
  • First release: Feb 4, 2016
  • Latest release: May 7, 2021
  • Number of updates: 17
  • Update frequency: every 112.9 days
  • Top authors: kasparsd (82.35%)georgestephanis (23.53%)

Code review

54 tests

User reviews

30 reviews

Install metrics

20,000+ active / 229,920 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼142.15ms] Passed 4 tests

An overview of server-side resources used by Application Passwords
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0836.07 ▲1.47
Dashboard /wp-admin3.14 ▲0.0947.25 ▲2.10
Posts /wp-admin/edit.php3.23 ▲0.1242.65 ▼5.25
Add New Post /wp-admin/post-new.php5.51 ▲0.0890.48 ▼561.79
Media Library /wp-admin/upload.php3.09 ▲0.0933.61 ▼3.01
/wp-admin/admin.php?page=auth_app3.0633.59

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Application Passwords
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.24 ▲0.3910.01 ▲2.2952.99 ▲0.15
Dashboard /wp-admin2,967 ▲365.86 ▼0.11145.88 ▼41.99111.42 ▼6.55
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0067.55 ▼3.0698.95 ▼2.18
Add New Post /wp-admin/post-new.php1,604 ▼7918.80 ▲0.46389.88 ▲5.34119.12 ▼6.44
Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.00170.11 ▲3.26121.59 ▼45.86
/wp-admin/admin.php?page=auth_app1,0892.3561.4268.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/application-passwords/class.application-passwords-list-table.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/application-passwords/class.application-passwords-list-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/application-passwords/class.application-passwords-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/application-passwords/class.application-passwords.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: authentication, application-passwords, xml-rpc, security, rest api

application-passwords/application-passwords.php Passed 13 tests

The main PHP script in "Application Passwords" version 0.1.3 is automatically included on every request by WordPress
103 characters long description:
Creates unique passwords for applications to authenticate users without revealing their main passwords.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin753 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP396344507
JavaScript2308167
JSON10047
Markdown124021
CSS12011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity28.50
▷ Minimum class complexity10.00
▷ Maximum class complexity47.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods2482.76%
▷ Public methods2793.10%
▷ Protected methods26.90%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin