84% force-password-change

Code Review | Force Password Change

WordPress plugin Force Password Change scored 84% from 54 tests.

About plugin

  • Plugin page: force-password-ch...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.5
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Aug 10, 2020
  • Number of updates: 13
  • Update frequency: every 217.0 days
  • Top authors: lumpysimon (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 13,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.15ms] Passed 4 tests

An overview of server-side resources used by Force Password Change
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.10 ▼13.56
Dashboard /wp-admin3.32 ▲0.0255.24 ▲4.19
Posts /wp-admin/edit.php3.38 ▲0.0248.79 ▼1.94
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.51 ▼13.57
Media Library /wp-admin/upload.php3.25 ▲0.0234.97 ▲0.49

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Force Password Change
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.171.82 ▼0.0141.35 ▼1.25
Dashboard /wp-admin2,206 ▲184.87 ▼0.94111.85 ▼0.8143.41 ▼0.15
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0341.90 ▲6.1837.10 ▲0.27
Add New Post /wp-admin/post-new.php1,547 ▲3318.25 ▲0.70602.39 ▼25.2448.42 ▼6.04
Media Library /wp-admin/upload.php1,385 ▼04.25 ▲0.09102.50 ▼0.6744.24 ▼0.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/force-password-change/force-password-change.php:77

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: user control, user, passwords, register, login...

force-password-change/force-password-change.php Passed 13 tests

"Force Password Change" version 0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Require users to change their password on first login.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected696 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PO File22132222629
PHP1714967

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin