89% ivguard

Code Review | IVGuard

WordPress plugin IVGuard scored89%from 54 tests.

About plugin

  • Plugin page: ivguard
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7
  • WordPress version: 6.3.1
  • First release: Jul 22, 2016
  • Latest release: Dec 21, 2016
  • Number of updates: 11
  • Update frequency: every 14.0 days
  • Top authors: manky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,286 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.15MB] [CPU: ▼8.44ms] Passed 4 tests

Server-side resources used by IVGuard
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1642.04 ▲3.36
Dashboard /wp-admin3.46 ▲0.1250.71 ▼10.26
Posts /wp-admin/edit.php3.58 ▲0.2248.69 ▼5.55
Add New Post /wp-admin/post-new.php6.04 ▲0.1588.47 ▼18.50
Media Library /wp-admin/upload.php3.39 ▲0.1639.65 ▲0.56

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: 3 new tables, 9 new options
New tables
wp_ivguard_candidate_blocking
wp_ivguard_login_fail
wp_ivguard_blocked_ip
New WordPress options
ivGuardAPIVerifyIP
widget_theysaidso_widget
ivGuardDbVersion
widget_recent-comments
ivGuardKey
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by IVGuard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲9614.56 ▲0.031.84 ▲0.0339.01 ▲0.90
Dashboard /wp-admin2,246 ▲695.58 ▼0.0986.60 ▼4.3636.77 ▼5.68
Posts /wp-admin/edit.php2,154 ▲542.01 ▲0.0335.08 ▼1.3432.16 ▼1.10
Add New Post /wp-admin/post-new.php1,548 ▲2018.15 ▼4.85615.07 ▼2.1668.23 ▼9.94
Media Library /wp-admin/upload.php1,456 ▲564.25 ▲0.0897.61 ▼6.2342.41 ▼1.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • ivGuardDbVersion
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt might help

ivguard/IVGuard.php 85% from 13 tests

"IVGuard" version 1.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 301 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("ivguard.php" instead of "IVGuard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin643 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16612643

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity116.00
▷ Minimum class complexity116.00
▷ Maximum class complexity116.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods38
▷ Static methods38100.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants19
▷ Global constants00.00%
▷ Class constants19100.00%
▷ Public constants19100.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 were not PNG files found in your plugin