90% wp-author-security

Code Review | WP Author Security

WordPress plugin WP Author Security scored90%from 54 tests.

About plugin

  • Plugin page: wp-author-security
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Aug 13, 2020
  • Latest release: Apr 12, 2023
  • Number of updates: 19
  • Update frequency: every 51.2 days
  • Top authors: mgmsp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,096 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.12MB] [CPU: ▼9.14ms] Passed 4 tests

A check of server-side resources used by WP Author Security
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1241.53 ▼3.95
Dashboard /wp-admin3.44 ▲0.0950.67 ▼13.39
Posts /wp-admin/edit.php3.56 ▲0.2048.74 ▼8.34
Add New Post /wp-admin/post-new.php6.02 ▲0.1386.88 ▼10.87
Media Library /wp-admin/upload.php3.36 ▲0.1337.84 ▲4.39
WP Author Security /wp-admin/options-general.php?page=wp-author-security-options3.3435.00

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: 1 new table, 15 new options
New tables
wp_wpas_statisticmeta
New WordPress options
can_compress_scripts
wpas_filterAuthorSitemap
disableRestUser
wpas_filterEmbed
wpas_db_version
wpas_filterFeed
protectAuthor
widget_theysaidso_widget
widget_recent-comments
db_upgraded
...

Browser metrics Passed 4 tests

WP Author Security: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.27 ▼1.141.65 ▼0.1343.37 ▼0.42
Dashboard /wp-admin2,207 ▲164.84 ▼0.04110.74 ▲9.0139.11 ▼4.41
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0234.60 ▼1.6632.28 ▼2.53
Add New Post /wp-admin/post-new.php1,545 ▲1718.59 ▲0.38645.44 ▲37.9449.74 ▼5.76
Media Library /wp-admin/upload.php1,389 ▲44.19 ▼0.0294.98 ▼4.2440.76 ▼1.49
WP Author Security /wp-admin/options-general.php?page=wp-author-security-options9642.0322.4227.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: user-enumeration, author, privacy, security, wpscan

wp-author-security/wp-author-security.php Passed 13 tests

The primary PHP file in "WP Author Security" version 1.5.0 is used by WordPress to initiate all plugin functionality
113 characters long description:
Protect against user enumeration attacks on author pages and other places where valid user names can be obtained.

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
No dangerous file extensions were detected559 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP383126490
PO File1272969

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods13
▷ Static methods323.08%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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 images were found in this plugin