78% passwordsentry

Code Review | PasswordSentry

WordPress plugin PasswordSentry scored78%from 54 tests.

About plugin

  • Plugin page: passwordsentry
  • Plugin version: 1.0.13
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.2-6.4
  • WordPress version: 6.3.1
  • First release: Mar 17, 2014
  • Latest release: Nov 8, 2023
  • Number of updates: 46
  • Update frequency: every 76.7 days
  • Top authors: lionsgate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,490 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.57ms] Passed 4 tests

Server-side resources used by PasswordSentry
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0441.39 ▼2.66
Dashboard /wp-admin3.35 ▲0.0548.17 ▼6.87
Posts /wp-admin/edit.php3.40 ▲0.0449.04 ▲1.93
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.89 ▼1.81
Media Library /wp-admin/upload.php3.28 ▲0.0435.62 ▲1.08

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

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

Browser metrics Passed 4 tests

PasswordSentry: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.22 ▼0.521.72 ▼0.1039.39 ▼5.61
Dashboard /wp-admin2,196 ▲165.61 ▲0.0196.19 ▼2.4641.35 ▼0.97
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0241.01 ▲3.5237.88 ▲4.11
Add New Post /wp-admin/post-new.php1,532 ▲123.33 ▲0.48598.13 ▼101.0546.62 ▼10.56
Media Library /wp-admin/upload.php1,404 ▲14.20 ▼0.0598.40 ▼2.9044.67 ▼0.18
Password Sentry /wp-admin/passwordsentry.php260.410.1113.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • pswpp_settings
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/passwordsentry/passwordsentry.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/passwordsentry.php
    • > Network (severe)
    wp-admin/passwordsentry.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% 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 need to be fixed:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt might help

passwordsentry/passwordsentry.php Passed 13 tests

The primary PHP file in "PasswordSentry" version 1.0.13 is used by WordPress to initiate all plugin functionality
88 characters long description:
Integrates Password Sentry (PS) app into the WordPress (WP) environment to track logins.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected231 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1014211
CSS301019
JavaScript1061

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions9
▷ Named functions9100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logops.png11.63KB5.88KB▼ 49.49%