84% plainview-protect-passwords

Code Review | Plainview Protect Passwords

WordPress plugin Plainview Protect Passwords scored 84% from 54 tests.

About plugin

  • Plugin page: plainview-protect...
  • Plugin version: 1.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-5.0
  • WordPress version: 6.3.1
  • First release: Jun 17, 2015
  • Latest release: Nov 15, 2018
  • Number of updates: 18
  • Update frequency: every 69.3 days
  • Top authors: edward_plainview (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active / 13,430 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.39MB] [CPU: ▼0.63ms] Passed 4 tests

An overview of server-side resources used by Plainview Protect Passwords
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4041.10 ▼1.20
Dashboard /wp-admin3.70 ▲0.4046.55 ▼0.75
Posts /wp-admin/edit.php3.75 ▲0.3950.99 ▲5.28
Add New Post /wp-admin/post-new.php6.28 ▲0.3984.03 ▼0.58
Media Library /wp-admin/upload.php3.62 ▲0.3934.85 ▲0.02
Protect Passwords /wp-admin/options-general.php?page=pv_protect_passwords4.5738.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 218 new files
Database: no new tables, 9 new options
New WordPress options
Protect_Passwords_protected_users
Protect_Passwords_protected_roles
widget_recent-comments
can_compress_scripts
widget_recent-posts
Protect_Passwords_excepted_users
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Plainview Protect Passwords
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.22 ▼1.241.88 ▲0.0039.99 ▼7.29
Dashboard /wp-admin2,210 ▲224.86 ▼0.0395.15 ▼22.7037.02 ▼7.62
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.1433.96 ▼1.8132.45 ▼6.35
Add New Post /wp-admin/post-new.php1,517 ▼1617.64 ▼5.67687.08 ▲7.4648.39 ▼20.15
Media Library /wp-admin/upload.php1,389 ▲74.22 ▲0.0594.93 ▼2.3041.12 ▼2.74
Protect Passwords /wp-admin/options-general.php?page=pv_protect_passwords9182.0222.6827.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • Protect_Passwords_protected_roles
    • widget_theysaidso_widget
    • widget_recent-posts
    • Protect_Passwords_protected_users
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • Protect_Passwords_excepted_users

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 136× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_propas\\tests\\TestCase' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/pagination/tests/PaginationTest.php:3
    • > PHP Fatal error
      Trait 'plainview\\sdk_propas\\wordpress\\object_stores\\Store' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/wordpress/object_stores/Post.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_propas\\form2\\tests\\TestCase' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/form2/tests/MarkupTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_propas\\form2\\inputs\\inputfieldset' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/form2/inputs/radios.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_propas\\form2\\inputs\umber' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/form2/inputs/range.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_propas\\wordpress\\actions\\action' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/wordpress/plugin_pack/actions/get_plugin_classes.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_propas\\collections\\collection' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/tree/orphans.php:11
    • > PHP Fatal error
      Trait 'plainview\\sdk_propas\\traits\\method_chaining' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/wordpress/table/top/bulkactions.php on line 15
    • > PHP Fatal error
      Trait 'plainview\\sdk_propas\\traits\\sort_order' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/wordpress/row_actions/Action.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_propas\\form2\\inputs\\date' not found in wp-content/plugins/plainview-protect-passwords/src/sdk/form2/inputs/datetime.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed: The official readme.txt might help

plainview-protect-passwords/Protect_Passwords.php 92% from 13 tests

The primary PHP file in "Plainview Protect Passwords" version 1.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("plainview-protect-passwords.php" instead of "Protect_Passwords.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected10,675 lines of code in 209 files:
LanguageFilesBlank linesComment linesLines of code
PHP1952,6076,45710,108
JavaScript25866212
Markdown3430104
PO File1404398
Bourne Shell417962
JSON30049
XML10042

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.24
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces39
Interfaces0
Traits47
Classes140
▷ Abstract classes32.14%
▷ Concrete classes13797.86%
▷ Final classes00.00%
Methods1,048
▷ Static methods807.63%
▷ Public methods1,04199.33%
▷ Protected methods20.19%
▷ Private methods50.48%
Functions18
▷ Named functions1055.56%
▷ Anonymous functions844.44%
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
No PNG images were found in this plugin