89% guard

Code Review | Guard

WordPress plugin Guard scored89%from 54 tests.

About plugin

  • Plugin page: guard
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Jul 12, 2016
  • Latest release: Nov 2, 2016
  • Number of updates: 15
  • Update frequency: every 7.5 days
  • Top authors: lowest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,489 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼10.55ms] Passed 4 tests

A check of server-side resources used by Guard
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0549.51 ▲5.76
Dashboard /wp-admin3.37 ▲0.0251.77 ▼26.10
Posts /wp-admin/edit.php3.48 ▲0.1253.55 ▲1.38
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.74 ▼23.22
Media Library /wp-admin/upload.php3.29 ▲0.0641.82 ▲5.93
Guard /wp-admin/options-general.php?page=guard3.2537.14

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/guard/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Guard
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲12713.96 ▼0.315.82 ▲3.9842.93 ▲0.33
Dashboard /wp-admin2,222 ▲165.84 ▲0.7697.07 ▼5.6539.38 ▼1.32
Posts /wp-admin/edit.php2,101 ▲12.01 ▲0.0139.00 ▼0.0735.37 ▼3.41
Add New Post /wp-admin/post-new.php1,557 ▲1523.16 ▼0.07664.73 ▼17.7258.69 ▲1.75
Media Library /wp-admin/upload.php1,407 ▲74.23 ▼0.05110.04 ▼0.5546.82 ▼0.48
Guard /wp-admin/options-general.php?page=guard8442.0829.8726.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

guard/guard.php 85% from 13 tests

"Guard" version 1.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("")

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 plugin293 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15829293

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected