68% wwpass

Code Review | WWPass Two-factor Authentication

WordPress plugin WWPass Two-factor Authentication scored68%from 54 tests.

About plugin

  • Plugin page: wwpass
  • Plugin version: 3.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.6-5.1.1
  • WordPress version: 6.3.1
  • First release: Oct 4, 2013
  • Latest release: Mar 26, 2019
  • Number of updates: 23
  • Update frequency: every 87.1 days
  • Top authors: v.korshunov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,211 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.94MB] [CPU: ▼33.41ms] Passed 4 tests

Server-side resources used by WWPass Two-factor Authentication
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.03 ▲5.86
Dashboard /wp-admin3.00 ▼0.3023.86 ▼22.65
Posts /wp-admin/edit.php3.00 ▼0.3527.46 ▼22.82
Add New Post /wp-admin/post-new.php3.00 ▼2.8826.43 ▼76.37
Media Library /wp-admin/upload.php3.00 ▼0.2323.55 ▼11.78
WWPass /wp-admin/options-general.php?page=wwpass/wordpress_integration.phpadmin3.0026.80

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
wp_wwpass
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WWPass Two-factor Authentication
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.20 ▼1.102.04 ▲0.4345.21 ▼0.38
Dashboard /wp-admin2,204 ▲155.85 ▲0.94102.61 ▼17.4340.49 ▼0.33
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0639.56 ▼0.9335.23 ▼3.39
Add New Post /wp-admin/post-new.php1,540 ▲2123.20 ▲0.10692.01 ▲83.9855.80 ▼0.87
Media Library /wp-admin/upload.php1,386 ▲44.17 ▼0.0299.17 ▼3.6046.13 ▼1.11
WWPass /wp-admin/options-general.php?page=wwpass/wordpress_integration.phpadmin8452.0327.2228.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wwpass/wordpress_integration.phpadmin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=wwpass/wordpress_integration.phpadmin
    • > Notice in wp-content/plugins/wwpass/wordpress_integration.php+549
    Undefined variable: message
    • > GET request to /wp-admin/options-general.php?page=wwpass/wordpress_integration.phpadmin
    • > Notice in wp-content/plugins/wwpass/wordpress_integration.php+557
    Undefined variable: error

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wwpass/wordpress_integration.php:77

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 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
9 plugin tags: clef replacement, wwpass, security, login, clef...

wwpass/wordpress_integration.php 92% from 13 tests

The principal PHP file in "WWPass Two-factor Authentication" v. 3.1.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wwpass.php" instead of "wordpress_integration.php")

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
Good job! No executable or dangerous file extensions detected838 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP215464838

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin