84% puredevs-wp-locker

Code Review | PureDevs WP Locker

WordPress plugin PureDevs WP Locker scored 84% from 54 tests.

About plugin

  • Plugin page: puredevs-wp-locker
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Jul 31, 2023
  • Latest release: Aug 29, 2023
  • Number of updates: 5
  • Update frequency: every 6.0 days
  • Top authors: puredevs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 137 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.10MB] [CPU: ▼0.95ms] Passed 4 tests

A check of server-side resources used by PureDevs WP Locker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.70 ▼9.72
Dashboard /wp-admin3.40 ▲0.1048.38 ▲2.43
Posts /wp-admin/edit.php3.52 ▲0.1649.86 ▲1.24
Add New Post /wp-admin/post-new.php6.00 ▲0.1294.55 ▲2.23
Media Library /wp-admin/upload.php3.33 ▲0.1035.04 ▲4.26
PureDevs WP Locker /wp-admin/options-general.php?page=puredevs-wp-locker-setting3.2931.88

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
wp_user_ip_address
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PureDevs WP Locker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.61 ▼0.824.72 ▲2.7437.48 ▼6.85
Dashboard /wp-admin2,211 ▲235.82 ▲0.9498.85 ▼14.7339.99 ▼8.64
Posts /wp-admin/edit.php2,097 ▲82.00 ▼0.0341.77 ▲5.0335.51 ▲0.54
Add New Post /wp-admin/post-new.php1,521 ▲223.21 ▲0.09630.52 ▼10.9552.92 ▼0.58
Media Library /wp-admin/upload.php1,396 ▲114.22 ▲0.0094.70 ▼12.0140.80 ▼2.75
PureDevs WP Locker /wp-admin/options-general.php?page=puredevs-wp-locker-setting8062.0624.1925.56

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/puredevs-wp-locker/public/partials/puredevs-wp-locker-public-display.php
    • > /wp-content/plugins/puredevs-wp-locker/admin/partials/puredevs-wp-locker-admin-display.php

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 is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: hide, password, hide site, lock, password protected...

puredevs-wp-locker/puredevs-wp-locker.php Passed 13 tests

The principal PHP file in "PureDevs WP Locker" v. 1.0.0 is loaded by WordPress automatically on each request
91 characters long description:
Use PureDevs WP locker To safeguard your entire WordPress site, by using a single password.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected592 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13185642466
CSS2159120
JavaScript24546

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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