10% randomize-password

Code Review | Randomize Password

WordPress plugin Randomize Password scored10%from 54 tests.

About plugin

  • Plugin page: randomize-password
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: May 29, 2017
  • Latest release: Mar 26, 2021
  • Number of updates: 7
  • Update frequency: every 199.7 days
  • Top authors: usmanaliqureshi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /758 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/randomize-password/randomize-password.php+136
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.02ms] Passed 4 tests

This is a short check of server-side resources used by Randomize Password
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.87 ▲0.56
Dashboard /wp-admin3.39 ▲0.0848.30 ▼2.69
Posts /wp-admin/edit.php3.50 ▲0.1450.29 ▼2.97
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.93 ▼14.96
Media Library /wp-admin/upload.php3.31 ▲0.0838.88 ▲3.36
Randomize Password /wp-admin/options-general.php?page=randomize_password_settings3.2834.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
rp_options

Browser metrics Passed 4 tests

A check of browser resources used by Randomize Password
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.111.74 ▲0.2045.41 ▲2.14
Dashboard /wp-admin2,202 ▲225.53 ▼0.1085.01 ▼6.4340.31 ▼3.26
Posts /wp-admin/edit.php2,107 ▲71.98 ▼0.0437.60 ▼0.1336.73 ▼2.15
Add New Post /wp-admin/post-new.php1,529 ▲323.02 ▼0.29687.18 ▲22.6464.78 ▲14.95
Media Library /wp-admin/upload.php1,398 ▼24.23 ▲0.08106.33 ▲3.2247.49 ▼0.62
Randomize Password /wp-admin/options-general.php?page=randomize_password_settings8662.0326.3826.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • rp_options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Option for each user on user settings page and profile page.), #2 (Randomize Password Settings page in Dashboard → Settings.)
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

randomize-password/randomize-password.php 85% from 13 tests

Analyzing the main PHP file in "Randomize Password" version 1.0.0
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 258 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin303 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2282182303

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png33.64KB13.34KB▼ 60.36%
screenshot-1.png12.39KB4.87KB▼ 60.72%