10% wp-auth-logging

Code Review | wp-auth-logging

WordPress plugin wp-auth-logging scored10%from 54 tests.

About plugin

  • Plugin page: wp-auth-logging
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2014
  • Latest release: Jul 10, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: yosusk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /550 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wp-auth-logging/authlogging.php+47
    Use of undefined constant wp_auth_logging_fail_log - assumed 'wp_auth_logging_fail_log' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.97MB] [CPU: ▼53.29ms] Passed 4 tests

Analyzing server-side resources used by wp-auth-logging
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.30 ▼31.52
Dashboard /wp-admin2.05 ▼1.306.12 ▼50.27
Posts /wp-admin/edit.php2.05 ▼1.315.39 ▼42.25
Add New Post /wp-admin/post-new.php2.05 ▼3.844.94 ▼89.11
Media Library /wp-admin/upload.php2.05 ▼1.184.94 ▼28.78

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

wp-auth-logging: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.15 ▼1.211.58 ▼0.1140.04 ▼1.00
Dashboard /wp-admin2,200 ▲95.79 ▲0.9098.42 ▼2.7437.90 ▼2.62
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0336.44 ▼2.4030.07 ▼5.54
Add New Post /wp-admin/post-new.php1,542 ▲1418.69 ▲0.31583.28 ▼20.7151.00 ▲2.41
Media Library /wp-admin/upload.php1,391 ▲34.28 ▲0.0893.89 ▼11.6941.50 ▼3.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/wp-auth-logging/authlogging.php+47
    Use of undefined constant wp_auth_logging_fail_log - assumed 'wp_auth_logging_fail_log' (this will throw an Error in a future version of PHP)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just 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/wp-auth-logging/authlogging.php:47

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

wp-auth-logging/authlogging.php 92% from 13 tests

The principal PHP file in "wp-auth-logging" v. 0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-auth-logging.php" instead of "authlogging.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 detected29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP191229

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions4
▷ Named functions4100.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
No PNG files were detected