89% absolute-2fa-for-woocommerce

Code Review | Absolute 2fa For Woocommerce

WordPress plugin Absolute 2fa For Woocommerce scored89%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: 6.3.1
  • 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 /500 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼4.35ms] Passed 4 tests

This is a short check of server-side resources used by Absolute 2fa For Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.36 ▼1.66
Dashboard /wp-admin3.31 ▲0.0147.48 ▼5.29
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▼4.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.39 ▼5.90
Media Library /wp-admin/upload.php3.23 ▲0.0035.53 ▼0.60

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
woocommerce_queue_flush_rewrite_rules
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Absolute 2fa For Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.171.91 ▼0.1446.35 ▲3.24
Dashboard /wp-admin2,209 ▲215.89 ▼0.0196.33 ▼17.2841.22 ▼0.97
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0447.36 ▲7.9342.59 ▲1.94
Add New Post /wp-admin/post-new.php1,514 ▼1917.60 ▼5.51642.71 ▲12.0952.82 ▼2.95
Media Library /wp-admin/upload.php1,385 ▼64.24 ▲0.0895.23 ▼4.8344.13 ▼2.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • woocommerce_queue_flush_rewrite_rules
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: two factor auth, 2fa, google authenticator, two factor, tfa

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

"Absolute 2fa For Woocommerce" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to 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 considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141766

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected