83% proxy-vpn-blocker

Code Review | Proxy & VPN Blocker

WordPress plugin Proxy & VPN Blocker scored83%from 54 tests.

About plugin

  • Plugin page: proxy-vpn-blocker
  • Plugin version: 2.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 25, 2017
  • Latest release: Sep 1, 2023
  • Number of updates: 149
  • Update frequency: every 13.9 days
  • Top authors: rickstermuk (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

2,000+ active /71,853 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.10MB] [CPU: ▼5.73ms] Passed 4 tests

Server-side resources used by Proxy & VPN Blocker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0847.82 ▲4.38
Dashboard /wp-admin3.42 ▲0.0750.16 ▼14.03
Posts /wp-admin/edit.php3.47 ▲0.1250.37 ▼2.68
Add New Post /wp-admin/post-new.php6.03 ▲0.1497.53 ▼10.57
Media Library /wp-admin/upload.php3.36 ▲0.1346.09 ▲8.79
Blacklist Editor /wp-admin/admin.php?page=proxy_vpn_blocker_blacklist3.4137.92
Whitelist Editor /wp-admin/admin.php?page=proxy_vpn_blocker_whitelist3.4040.58
PVB Settings /wp-admin/admin.php?page=proxy_vpn_blocker_settings3.3841.38
API Key Statistics /wp-admin/admin.php?page=proxy_vpn_blocker_statistics3.5039.67

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 294 new files
Database: no new tables, 12 new options
New WordPress options
widget_theysaidso_widget
pvb_db_version
theysaidso_admin_options
pvb_protect_comments
widget_recent-posts
widget_recent-comments
pvb_protect_default_login_page
can_compress_scripts
db_upgraded
pvb_log_user_ip_select_box
...

Browser metrics Passed 4 tests

A check of browser resources used by Proxy & VPN Blocker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10513.21 ▼1.171.71 ▼0.7038.75 ▼3.37
Dashboard /wp-admin2,275 ▲684.97 ▼0.0098.21 ▼8.9383.00 ▲33.58
Posts /wp-admin/edit.php2,154 ▲542.03 ▲0.0341.02 ▼1.1433.69 ▼7.91
Add New Post /wp-admin/post-new.php1,573 ▲2323.10 ▼0.39759.12 ▲110.1468.10 ▲14.27
Media Library /wp-admin/upload.php1,448 ▲484.27 ▲0.06100.64 ▼5.7866.44 ▲22.14
Blacklist Editor /wp-admin/admin.php?page=proxy_vpn_blocker_blacklist8702.0835.4631.32
Whitelist Editor /wp-admin/admin.php?page=proxy_vpn_blocker_whitelist8642.0931.2331.77
PVB Settings /wp-admin/admin.php?page=proxy_vpn_blocker_settings3,2562.4249.5453.92
API Key Statistics /wp-admin/admin.php?page=proxy_vpn_blocker_statistics8774.3798.3627.93

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
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • pvb_log_user_ip_select_box
    • widget_recent-posts
    • can_compress_scripts
    • pvb_db_version
    • pvb_protect_comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/proxy-vpn-blocker/includes/user-ip.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/proxy-vpn-blocker/pvb-db-upgrade.php:109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/proxy-vpn-blocker/includes/proxycheckio-whitelist.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/proxy-vpn-blocker/proxy-vpn-blocker-function.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/proxy-vpn-blocker/includes/help-mode.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/proxy-vpn-blocker/includes/proxycheckio-blacklist.php:67
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/proxy-vpn-blocker/uninstall.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

proxy-vpn-blocker/proxy-vpn-blocker-function.php 85% from 13 tests

"Proxy & VPN Blocker" version 2.2.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("proxy-vpn-blocker.php" instead of "proxy-vpn-blocker-function.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected10,930 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121,2584264,879
PHP163057053,334
CSS8209722,669
SVG20029
Markdown15018
XML1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity36.00
▷ Minimum class complexity8.00
▷ Maximum class complexity67.00
Average method complexity4.39
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods3096.77%
▷ Protected methods00.00%
▷ Private methods13.23%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
246 PNG files occupy 0.77MB with 0.58MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/country_flags/CI.png2.90KB0.35KB▼ 87.98%
assets/img/country_flags/TH.png2.93KB0.34KB▼ 88.49%
assets/img/country_flags/DJ.png3.63KB1.06KB▼ 70.84%
assets/img/country_flags/BR.png4.69KB1.61KB▼ 65.67%
assets/img/country_flags/AG.png4.14KB1.44KB▼ 65.28%