68% guardiankey

Code Review | GuardianKey

WordPress plugin GuardianKey scored68%from 54 tests.

About plugin

  • Plugin page: guardiankey
  • Plugin version: 3.11
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Dec 29, 2018
  • Latest release: Jul 6, 2023
  • Number of updates: 62
  • Update frequency: every 26.6 days
  • Top authors: gbernardes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,122 total downloads

Benchmarks

Plugin footprint 65% 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.54MB] [CPU: ▼17.97ms] Passed 4 tests

This is a short check of server-side resources used by GuardianKey
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1442.63 ▲3.28
Dashboard /wp-admin3.49 ▲0.1150.37 ▼11.82
Posts /wp-admin/edit.php3.61 ▲0.2152.31 ▼1.30
Add New Post /wp-admin/post-new.php3.37 ▼2.5641.76 ▼59.78
Media Library /wp-admin/upload.php3.41 ▲0.1438.46 ▲1.01
GuardianKey /wp-admin/tools.php?page=guardiankey3.4340.84

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 9 new options
New tables
wp_guardiankey
New WordPress options
widget_recent-posts
gk_mailsubject
can_compress_scripts
gk_mailhtml
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
gk_admin_email

Browser metrics Passed 4 tests

A check of browser resources used by GuardianKey
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.19 ▼0.161.70 ▼0.0141.21 ▼2.58
Dashboard /wp-admin2,199 ▲255.58 ▼0.1490.88 ▲2.6140.92 ▼3.91
Posts /wp-admin/edit.php2,107 ▲42.02 ▲0.0140.10 ▲0.3637.20 ▲1.18
Add New Post /wp-admin/post-new.php1,529 ▲322.87 ▼0.64685.90 ▲45.3357.48 ▲0.50
Media Library /wp-admin/upload.php1,404 ▲74.15 ▼0.02103.87 ▼1.7944.98 ▲1.90
GuardianKey /wp-admin/tools.php?page=guardiankey2,0137.34165.73104.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_guardiankey
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • gk_mailsubject
    • db_upgraded
    • gk_mailhtml
    • gk_admin_email
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/guardiankey/functions.php
    • > /wp-content/plugins/guardiankey/viewresolve.php
    • > /wp-content/plugins/guardiankey/index.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: t in wp-content/plugins/guardiankey/viewresolve.php on line 10
    • > PHP Notice
      Undefined property: stdClass::$LOCATION in wp-content/plugins/guardiankey/viewresolve.php on line 91
    • > PHP Notice
      Undefined index: e in wp-content/plugins/guardiankey/viewresolve.php on line 9
    • > PHP Notice
      Undefined property: stdClass::$DATETIME in wp-content/plugins/guardiankey/viewresolve.php on line 81
    • > PHP Notice
      Undefined property: stdClass::$IPADDRESS in wp-content/plugins/guardiankey/viewresolve.php on line 92
    • > PHP Notice
      Undefined property: stdClass::$USERNAME in wp-content/plugins/guardiankey/viewresolve.php on line 88
    • > PHP Notice
      Undefined property: stdClass::$return in wp-content/plugins/guardiankey/viewresolve.php on line 84
    • > PHP Notice
      Undefined property: stdClass::$SYSTEM in wp-content/plugins/guardiankey/viewresolve.php on line 90

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: authentication, block hackers, login security, security

guardiankey/index.php 85% from 13 tests

The principal PHP file in "GuardianKey" v. 3.11 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 361 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("guardiankey.php" instead of "index.php")

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
There were no executable files found in this plugin1,005 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4198271,005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity3.55
▷ Minimum method complexity2.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
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
3 PNG files occupy 0.24MB with 0.16MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-128x128.png0.88KB0.40KB▼ 54.22%
screenshot-1.png151.58KB42.18KB▼ 72.17%
screenshot-2.png91.90KB27.45KB▼ 70.13%