84% prevent-password-reset

Code Review | Prevent Password Reset

WordPress plugin Prevent Password Reset scored84%from 54 tests.

About plugin

  • Plugin page: prevent-password-...
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.7
  • WordPress version: 6.3.1
  • First release: Jan 19, 2012
  • Latest release: Oct 6, 2013
  • Number of updates: 6
  • Update frequency: every 104.3 days
  • Top authors: greenshady (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /9,266 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.78ms] Passed 4 tests

Analyzing server-side resources used by Prevent Password Reset
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0349.12 ▲8.96
Dashboard /wp-admin3.32 ▲0.0247.96 ▼8.03
Posts /wp-admin/edit.php3.37 ▲0.0251.94 ▼1.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.61 ▼12.77
Media Library /wp-admin/upload.php3.25 ▲0.0238.39 ▲3.60

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Prevent Password Reset: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.37 ▲0.112.04 ▲0.3943.13 ▲0.87
Dashboard /wp-admin2,195 ▲185.63 ▼0.0492.59 ▼4.0441.83 ▼2.84
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0341.52 ▲2.0236.31 ▼1.70
Add New Post /wp-admin/post-new.php1,531 ▲523.03 ▼0.20678.49 ▼9.6558.58 ▲7.22
Media Library /wp-admin/upload.php1,397 ▼04.14 ▼0.04113.59 ▲12.5447.13 ▲0.88

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prevent-password-reset/prevent-password-reset.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Disabled password reset), #2 (Password reset checkbox on user profile page)
You can take inspiration from this readme.txt

prevent-password-reset/prevent-password-reset.php 92% from 13 tests

The main file in "Prevent Password Reset" v. 0.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 208 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected63 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1197343
Markdown113020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png8.76KB8.36KB▼ 4.52%
screenshot-1.png10.00KB9.66KB▼ 3.47%