84% password-protection-expiration

Code Review | Password Protection Expiration

WordPress plugin Password Protection Expiration scored84%from 54 tests.

About plugin

  • Plugin page: password-protecti...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Nov 6, 2015
  • Latest release: Dec 17, 2015
  • Number of updates: 6
  • Update frequency: every 7.0 days
  • Top authors: MortimerMcMire315 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /2,712 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: ▼1.94ms] Passed 4 tests

An overview of server-side resources used by Password Protection Expiration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.75 ▼2.32
Dashboard /wp-admin3.33 ▲0.0253.80 ▲1.37
Posts /wp-admin/edit.php3.38 ▲0.0251.34 ▼0.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0194.68 ▼2.03
Media Library /wp-admin/upload.php3.25 ▲0.0138.77 ▼3.23
Password-Protection Expiration /wp-admin/options-general.php?page=pass-protection-exp3.2133.91

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Password Protection Expiration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.081.77 ▲0.1543.66 ▲2.24
Dashboard /wp-admin2,202 ▲225.61 ▼0.0687.91 ▼7.1542.15 ▲3.56
Posts /wp-admin/edit.php2,111 ▲112.03 ▼0.1141.01 ▼1.3634.81 ▼4.44
Add New Post /wp-admin/post-new.php1,529 ▲122.95 ▼0.22632.47 ▼97.3257.68 ▲1.13
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.04106.35 ▼4.7245.10 ▼4.67
Password-Protection Expiration /wp-admin/options-general.php?page=pass-protection-exp7912.0025.8526.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • ppe_expire_time
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/password-protection-expiration/password-protection-expiration.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: cookie, expire, protection, password

password-protection-expiration/password-protection-expiration.php Passed 13 tests

This is the main PHP file of "Password Protection Expiration" version 0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
125 characters long description:
Change the amount of time after which a password entered for a password-protected post will expire and need to be re-entered.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin58 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162258

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin