74% wp-guardian

Code Review | WP Guardian

WordPress plugin WP Guardian scored74%from 54 tests.

About plugin

  • Plugin page: wp-guardian
  • Plugin version: 1.3.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 11, 2017
  • Latest release: May 2, 2018
  • Number of updates: 18
  • Update frequency: every 11.4 days
  • Top authors: danieltj (83.33%)jfcby (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /914 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼0.29ms] Passed 4 tests

Server-side resources used by WP Guardian
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2247.06 ▲4.74
Dashboard /wp-admin3.51 ▲0.1757.03 ▼4.36
Posts /wp-admin/edit.php3.62 ▲0.2749.27 ▲0.23
Add New Post /wp-admin/post-new.php6.11 ▲0.22101.12 ▲3.50
Media Library /wp-admin/upload.php3.43 ▲0.2137.21 ▼0.53
Security /wp-admin/admin.php?page=dtjwpg_guardian3.4335.00
Settings /wp-admin/admin.php?page=dtjwpg_settings3.4036.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 33 new files
Database: 2 new tables, 34 new options
New tables
wp_dtjwpg_logins
wp_dtjwpg_lockouts
New WordPress options
dtjwpg_backend_redirect_option
widget_recent-comments
dtjwpg_update_plugins_option
dtjwpg_lockout_logins_option
dtjwpg_update_l10n_option
dtjwpg_version_option
db_upgraded
can_compress_scripts
dtjwpg_lockout_logins_time_option
dtjwpg_verify_option
...

Browser metrics Passed 4 tests

WP Guardian: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.35 ▲0.061.74 ▲0.0843.16 ▲1.50
Dashboard /wp-admin2,231 ▲575.66 ▲0.0491.91 ▲5.7740.10 ▼4.66
Posts /wp-admin/edit.php2,136 ▲332.06 ▲0.0538.93 ▼3.3336.30 ▼5.85
Add New Post /wp-admin/post-new.php1,568 ▲4018.30 ▼4.55657.76 ▲0.5071.38 ▲17.95
Media Library /wp-admin/upload.php1,430 ▲304.31 ▲0.10100.71 ▼13.4143.10 ▼4.74
Security /wp-admin/admin.php?page=dtjwpg_guardian1,7732.1124.6832.93
Settings /wp-admin/admin.php?page=dtjwpg_settings9332.0624.1829.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_dtjwpg_lockouts
    • wp_dtjwpg_logins
  • Zombie WordPress options detected upon uninstall: 34 options
    • dtjwpg_lockout_logins_threshold_option
    • can_compress_scripts
    • dtjwpg_auto_updates_option
    • dtjwpg_verify_option
    • dtjwpg_lockout_logins_option
    • db_upgraded
    • dtjwpg_backend_token_option
    • dtjwpg_backup_email_option
    • dtjwpg_wp_wpssl_option
    • dtjwpg_wp_unfilter_option
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-guardian/assets/templates/guardian-version.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-guardian/assets/templates/guardian-verify.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-guardian/assets/templates/guardian-server.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-guardian/assets/templates/guardian-lockouts.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-guardian/assets/templates/guardian-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-guardian/assets/templates/guardian-backend.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-guardian/assets/templates/guardian-backups.php:3

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)
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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: backups, adopt-me, lockouts, login, security

wp-guardian/wp-guardian.php Passed 13 tests

The main PHP file in "WP Guardian" ver. 1.3.4 adds more information about the plugin and also serves as the entry point for this plugin
58 characters long description:
An easy way to harden your website's security effectively.

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
Success! There were no dangerous files found in this plugin2,217 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP189347341,745
CSS1553262
JavaScript28146156
Markdown234054

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions50
▷ Named functions50100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.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
No PNG images were found in this plugin