89% pb-unblock-some-ips

Code Review | PB Unblock some IPs

WordPress plugin PB Unblock some IPs scored89%from 54 tests.

About plugin

  • Plugin page: pb-unblock-some-ips
  • Plugin version: 0.7.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9.2
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Mar 29, 2022
  • Number of updates: 39
  • Update frequency: every 28.2 days
  • Top authors: patbloom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,248 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.04MB] [CPU: ▼3.62ms] Passed 4 tests

Analyzing server-side resources used by PB Unblock some IPs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.79 ▼1.81
Dashboard /wp-admin3.35 ▲0.0449.14 ▼7.00
Posts /wp-admin/edit.php3.40 ▲0.0449.73 ▼4.63
Add New Post /wp-admin/post-new.php5.93 ▲0.0498.52 ▲8.90
Media Library /wp-admin/upload.php3.27 ▲0.0435.22 ▼1.04
PB Unblock some IPs /wp-admin/options-general.php?page=pb-unblock-some-ips3.2335.22

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

A short overview of filesystem and database impact
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/pb-unblock-some-ips/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for PB Unblock some IPs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲10713.24 ▼1.144.83 ▲2.9445.38 ▲2.00
Dashboard /wp-admin2,238 ▲714.88 ▼0.77103.20 ▼7.4941.48 ▼0.77
Posts /wp-admin/edit.php2,117 ▲202.05 ▲0.0742.55 ▲7.4538.03 ▼1.03
Add New Post /wp-admin/post-new.php1,535 ▼1023.15 ▼0.26637.53 ▲7.4662.04 ▲11.86
Media Library /wp-admin/upload.php1,417 ▲204.27 ▲0.0096.99 ▼7.8046.51 ▲1.59
PB Unblock some IPs /wp-admin/options-general.php?page=pb-unblock-some-ips9222.1827.8251.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Looking good! No server-side errors or output on direct access of PHP files

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 97% 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
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt might help

pb-unblock-some-ips/pb-unblock-some-ips.php Passed 13 tests

This is the main PHP file of "PB Unblock some IPs" version 0.7.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
60 characters long description:
Block your website from being viewed - But unblock some IPs!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin465 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP63021169
CSS100135
LESS1150102
PO File1141459

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/linkedin.png1.19KB0.75KB▼ 36.86%
assets/images/facebook.png0.76KB0.47KB▼ 37.85%
assets/images/mail.png1.16KB0.69KB▼ 40.34%
assets/images/pbusi-logo.png11.91KB7.30KB▼ 38.65%
assets/images/internet.png3.28KB1.84KB▼ 43.84%