84% strong-password-generator-wp

Code Review | WP Strong Password Generator

WordPress plugin WP Strong Password Generator scored 84% from 54 tests.

About plugin

  • Plugin page: strong-password-g...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2021
  • Latest release: Jun 8, 2021
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: astranix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.68ms] Passed 4 tests

An overview of server-side resources used by WP Strong Password Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.54 ▼0.81
Dashboard /wp-admin3.32 ▲0.0143.47 ▼4.46
Posts /wp-admin/edit.php3.37 ▲0.0143.72 ▼2.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.84 ▼6.45
Media Library /wp-admin/upload.php3.24 ▲0.0133.87 ▲2.42

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Strong Password Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.25 ▼1.611.59 ▼0.1640.14 ▼0.97
Dashboard /wp-admin2,203 ▼35.83 ▼0.0894.70 ▲1.6737.44 ▲0.02
Posts /wp-admin/edit.php2,089 ▲32.04 ▲0.0240.97 ▲5.9134.50 ▲3.06
Add New Post /wp-admin/post-new.php1,533 ▼123.15 ▼0.15694.53 ▲14.7052.12 ▼4.22
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0192.58 ▼13.6742.64 ▼4.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_strong_password_generator_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/strong-password-generator-wp/wp-strong-password-generator-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/strong-password-generator-wp/wp-strong-password-generator-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: online password generator, password generator, strong password generator, password generator for wordpress, wp strong password generator plugin...

strong-password-generator-wp/wp-strong-password-generator.php 85% from 13 tests

"WP Strong Password Generator" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 184 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("strong-password-generator-wp.php" instead of "wp-strong-password-generator.php")

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
Good job! No executable or dangerous file extensions detected141 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33212141

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin