84% wp-user-sentry

Code Review | WP User Sentry

WordPress plugin WP User Sentry scored84%from 54 tests.

About plugin

  • Plugin page: wp-user-sentry
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: Jul 20, 2021
  • Number of updates: 6
  • Update frequency: every 73.5 days
  • Top authors: tnash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /615 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.19ms] Passed 4 tests

This is a short check of server-side resources used by WP User Sentry
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.07 ▼3.12
Dashboard /wp-admin3.38 ▲0.0745.53 ▼2.82
Posts /wp-admin/edit.php3.49 ▲0.1348.72 ▼2.53
Add New Post /wp-admin/post-new.php5.96 ▲0.0797.02 ▼4.28
Media Library /wp-admin/upload.php3.30 ▲0.0737.91 ▲2.61
WP User Sentry /wp-admin/options-general.php?page=wp-user-sentry-settings3.2731.44

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
wp_user_sentry_settings
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP User Sentry
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.74 ▲0.071.74 ▼0.0937.43 ▼4.57
Dashboard /wp-admin2,207 ▲155.83 ▲0.84100.02 ▼6.2441.30 ▼2.71
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0239.54 ▲0.7834.95 ▲1.86
Add New Post /wp-admin/post-new.php1,536 ▲823.14 ▲4.36629.46 ▲25.7253.07 ▲3.33
Media Library /wp-admin/upload.php1,395 ▲104.30 ▲0.0192.51 ▼1.1342.39 ▼0.95
WP User Sentry /wp-admin/options-general.php?page=wp-user-sentry-settings9072.0721.4730.40

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • wp_user_sentry_settings
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_user_sentry\\register_activation_hook() in wp-content/plugins/wp-user-sentry/wp-user-sentry.php:22

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can take inspiration from this readme.txt

wp-user-sentry/wp-user-sentry.php 92% from 13 tests

The entry point to "WP User Sentry" version 1.1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin581 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP541171581

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.40
▷ Minimum class complexity3.00
▷ Maximum class complexity29.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods1661.54%
▷ Public methods2388.46%
▷ Protected methods311.54%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected