84% wp-sheridan-password-generator

Code Review | WP Sheridan Password Generator

WordPress plugin WP Sheridan Password Generator scored84%from 54 tests.

About plugin

  • Plugin page: wp-sheridan-passw...
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Mar 16, 2013
  • Latest release: Mar 16, 2013
  • Number of updates: 4
  • Update frequency: every 2.0 days
  • Top authors: sheridaninternet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /916 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.02ms] Passed 4 tests

Server-side resources used by WP Sheridan Password Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.48 ▼5.92
Dashboard /wp-admin3.31 ▲0.0044.18 ▼4.07
Posts /wp-admin/edit.php3.36 ▲0.0045.81 ▼2.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.89 ▼11.71
Media Library /wp-admin/upload.php3.23 ▲0.0034.38 ▼1.05

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Sheridan Password Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6814.48 ▼0.261.86 ▼0.2050.49 ▲5.43
Dashboard /wp-admin2,206 ▲214.86 ▼0.09104.39 ▼9.6536.83 ▼9.31
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0336.48 ▼0.1435.62 ▼0.88
Add New Post /wp-admin/post-new.php1,539 ▲623.35 ▲0.16650.15 ▼22.5552.25 ▲5.58
Media Library /wp-admin/upload.php1,385 ▼04.29 ▲0.0597.11 ▼23.4041.38 ▼5.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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: Call to undefined function add_shortcode() in wp-content/plugins/wp-sheridan-password-generator/wp-sheridan-password-generator.php:57
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-sheridan-password-generator/wp-sheridan-password-generator.php on line 54

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-sheridan-password-generator === )
  • Screenshots: Please add images for these screenshots: #1 (This is the screenshot of the initial page allowing password generation options to be selected.), #2 (This is the screenshot of the generated password list.)
You can look at the official readme.txt

wp-sheridan-password-generator/wp-sheridan-password-generator.php Passed 13 tests

The principal PHP file in "WP Sheridan Password Generator" v. 1.02 is loaded by WordPress automatically on each request
87 characters long description:
Allows for a random password generator to be embedded in to your pages with a shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin363 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP250174315
HTML10048

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity60.00
▷ Minimum class complexity15.00
▷ Maximum class complexity105.00
Average method complexity7.94
▷ Minimum method complexity1.00
▷ Maximum method complexity87.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected