84% use-administrator-password

Code Review | Use Admin Password

WordPress plugin Use Admin Password scored84%from 54 tests.

About plugin

  • Plugin page: use-administrator...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.4
  • WordPress version: 6.3.1
  • First release: Dec 3, 2012
  • Latest release: Oct 18, 2023
  • Number of updates: 48
  • Update frequency: every 82.8 days
  • Top authors: DavidAnderson (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /12,923 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Use Admin Password
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.19 ▼1.91
Dashboard /wp-admin3.36 ▲0.0141.76 ▼16.79
Posts /wp-admin/edit.php3.41 ▲0.0550.03 ▲1.93
Add New Post /wp-admin/post-new.php5.94 ▲0.0577.65 ▼17.11
Media Library /wp-admin/upload.php3.28 ▲0.0534.24 ▲1.49
Use Administrator Password /wp-admin/options-general.php?page=use_admin_password3.2525.90

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Use Admin Password
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.27 ▼0.211.50 ▼0.3036.74 ▼5.86
Dashboard /wp-admin2,196 ▲195.59 ▼0.0395.49 ▲8.3842.65 ▼0.77
Posts /wp-admin/edit.php2,107 ▲71.99 ▲0.0039.04 ▲1.9335.50 ▼1.32
Add New Post /wp-admin/post-new.php1,529 ▲323.82 ▲0.74664.44 ▼35.5362.09 ▲8.73
Media Library /wp-admin/upload.php1,407 ▲44.19 ▼0.0893.88 ▼9.8841.34 ▼6.54
Use Administrator Password /wp-admin/options-general.php?page=use_admin_password9241.9923.5629.20

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/use-administrator-password/use-admin-password.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: admin login, login as any user, master password, master login, use admin password...

use-administrator-password/use-admin-password.php 92% from 13 tests

The entry point to "Use Admin Password" version 1.3.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("use-administrator-password.php" instead of "use-admin-password.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
Success! There were no dangerous files found in this plugin161 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16057161

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin