73% wp-security-log

Code Review | WP Security Log

WordPress plugin WP Security Log scored73%from 54 tests.

About plugin

  • Plugin page: wp-security-log
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Mar 11, 2013
  • Latest release: Mar 11, 2013
  • Number of updates: 16
  • Update frequency: every 61.1 days
  • Top authors: HoosierDragon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,630 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼7.91ms] Passed 4 tests

This is a short check of server-side resources used by WP Security Log
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3339.28 ▲2.86
Dashboard /wp-admin3.72 ▲0.3746.01 ▼17.20
Posts /wp-admin/edit.php3.77 ▲0.4146.18 ▲0.41
Add New Post /wp-admin/post-new.php6.24 ▲0.3579.21 ▼16.35
Media Library /wp-admin/upload.php3.58 ▲0.3435.57 ▲1.51
Error 404 Log 0 /wp-admin/admin.php?page=wp-security-log/error_404_log3.5232.64
Login Attack Log0 /wp-admin/admin.php?page=wp-security-log/login_attack_log3.5234.32
Options /wp-admin/admin.php?page=wp-security-log3.5532.07

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
wpseclog-error-404-check-search
wpseclog-login-attack-check
wpseclog-error-404-check-pagespeed
wpseclog_ip_address_list
widget_theysaidso_widget
can_compress_scripts
wpseclog-error-404-check
...

Browser metrics Passed 4 tests

WP Security Log: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.29 ▼1.461.67 ▲0.0840.00 ▼3.24
Dashboard /wp-admin2,245 ▲605.87 ▲0.78109.55 ▲5.7572.14 ▲30.34
Posts /wp-admin/edit.php2,132 ▲432.00 ▼0.0133.13 ▼7.5531.41 ▼4.23
Add New Post /wp-admin/post-new.php1,545 ▲1123.08 ▼0.14701.83 ▲34.7852.54 ▲1.21
Media Library /wp-admin/upload.php1,427 ▲454.20 ▲0.02100.57 ▲1.7846.65 ▲3.67
Error 404 Log 0 /wp-admin/admin.php?page=wp-security-log/error_404_log1,3781.9736.0934.81
Login Attack Log0 /wp-admin/admin.php?page=wp-security-log/login_attack_log1,4401.9833.1233.12
Options /wp-admin/admin.php?page=wp-security-log1,2332.0732.2734.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wpseclog_adnin_deactivate' not found or invalid function name
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-security-log/login_attack_log
    • > Warning in wp-content/plugins/wp-security-log/includes/data-summary.class.php+77
    uksort() expects parameter 1 to be array, null given
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-security-log/login_attack_log
    • > Warning in wp-content/plugins/wp-security-log/includes/data-summary.class.php+81
    ksort() expects parameter 1 to be array, null given
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-security-log/login_attack_log
    • > Warning in wp-content/plugins/wp-security-log/includes/data-summary.class.php+113
    Invalid argument supplied for foreach()

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Options screen), #2 (Error 404 display screen), #3 (Error 404 summary screen), #4 (Login Attack display screen), #5 (Login Attack summary screen)
The official readme.txt is a good inspiration

wp-security-log/wp-security-log.php 92% from 13 tests

The main file in "WP Security Log" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)

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 plugin3,276 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP73045031,873
JavaScript61922451,346
CSS471457

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.33
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 0.63MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png101.15KB49.41KB▼ 51.15%
screenshot-2.png131.74KB80.85KB▼ 38.63%
images/log-16.png0.62KB0.84KB0.00%
images/error-32.png2.16KB1.58KB▼ 26.85%
images/warning-32.png1.57KB1.41KB▼ 10.42%