68% active-auth

Code Review | ActiveAuth

WordPress plugin ActiveAuth scored68%from 54 tests.

About plugin

  • Plugin page: active-auth
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Nov 18, 2014
  • Latest release: Nov 25, 2014
  • Number of updates: 18
  • Update frequency: every 0.4 days
  • Top authors: ActiveAuth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,376 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▼1.17MB] [CPU: ▼41.58ms] Passed 4 tests

Analyzing server-side resources used by ActiveAuth
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6614.16 ▼26.54
Dashboard /wp-admin2.85 ▼0.5016.36 ▼43.95
Posts /wp-admin/edit.php2.85 ▼0.5119.70 ▼27.24
Add New Post /wp-admin/post-new.php2.85 ▼3.0417.30 ▼68.60
Media Library /wp-admin/upload.php2.85 ▼0.3816.43 ▼17.42
Active Auth /wp-admin/options-general.php?page=aca-settings2.8516.74

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
aca_akey
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for ActiveAuth
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.60 ▼1.081.82 ▲0.1140.24 ▼6.06
Dashboard /wp-admin2,207 ▲165.79 ▲0.7298.33 ▼4.9636.10 ▼1.83
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0634.37 ▼3.3332.52 ▼1.53
Add New Post /wp-admin/post-new.php1,536 ▲1723.29 ▲0.28633.24 ▲6.1352.01 ▼0.18
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0495.08 ▼0.2241.19 ▼2.60
Active Auth /wp-admin/options-general.php?page=aca-settings8542.0622.8426.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/active-auth/activeauth.php+168
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=aca-settings
    • > Notice in wp-content/plugins/active-auth/includes/ActiveAuthSettings.php+252
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/active-auth/activeauth.php:360

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: security, login, two factor authentication

active-auth/activeauth.php 92% from 13 tests

"ActiveAuth" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("active-auth.php" instead of "activeauth.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin550 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP310792530
JavaScript11520

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.50
▷ Minimum class complexity6.00
▷ Maximum class complexity21.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png60.84KB20.01KB▼ 67.12%
screenshot-1.png43.57KB10.57KB▼ 75.75%