89% absolute-2fa-for-woocommerce

Code Review | Absolute 2fa For Woocommerce

WordPress plugin Absolute 2fa For Woocommerce scored 89% from 54 tests.

About plugin

  • Plugin page: absolute-2fa-for-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.9
  • WordPress version: 5.9.2
  • First release: Dec 27, 2021
  • Latest release: Feb 17, 2022
  • Number of updates: 7
  • Update frequency: every 8.0 days
  • Top authors: absoluteplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼300.45ms] Passed 4 tests

An overview of server-side resources used by Absolute 2fa For Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0259.39 ▲6.72
Dashboard /wp-admin3.43 ▲0.0232.46 ▼7.16
Posts /wp-admin/edit.php3.66 ▲0.0236.07 ▼7.70
Add New Post /wp-admin/post-new.php6.90 ▼0.0792.51 ▼1,186.78
Media Library /wp-admin/upload.php3.31 ▲0.0124.96 ▼0.16

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
woocommerce_queue_flush_rewrite_rules

Browser metrics Passed 4 tests

A check of browser resources used by Absolute 2fa For Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲3716.27 ▲0.626.25 ▲0.022.78 ▲0.41
Dashboard /wp-admin2,895 ▲346.13 ▼0.06116.74 ▼22.51151.39 ▼12.71
Posts /wp-admin/edit.php2,694 ▲33.37 ▲0.0061.07 ▼1.03132.52 ▼10.62
Add New Post /wp-admin/post-new.php1,710 ▲4921.73 ▲5.69438.35 ▲24.58160.64 ▲5.44
Media Library /wp-admin/upload.php1,698 ▼05.51 ▼0.03147.79 ▲6.42180.60 ▼6.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • woocommerce_queue_flush_rewrite_rules

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
5 plugin tags: two factor auth, two factor, tfa, google authenticator, 2fa

absolute-2fa-for-woocommerce/absolute-2fa-for-woocommerce.php 85% from 13 tests

This is the main PHP file of "Absolute 2fa For Woocommerce" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 173 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.5" instead of "5.0.0")

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
Good job! No executable or dangerous file extensions detected66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141766

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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