84% tor-router

Code Review | Tor Router

WordPress plugin Tor Router scored 84% from 54 tests.

About plugin

  • Plugin page: tor-router
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.7
  • WordPress version: 5.9.2
  • First release: Mar 25, 2020
  • Latest release: Mar 5, 2021
  • Number of updates: 12
  • Update frequency: every 28.8 days
  • Top authors: onionbazaar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 679 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼304.25ms] Passed 4 tests

This is a short check of server-side resources used by Tor Router
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0853.19 ▲1.65
Dashboard /wp-admin3.50 ▲0.0934.11 ▼6.72
Posts /wp-admin/edit.php3.72 ▲0.0835.13 ▼0.87
Add New Post /wp-admin/post-new.php6.96 ▼0.0193.28 ▼1,208.68
Media Library /wp-admin/upload.php3.38 ▲0.0823.79 ▼0.72
Tor Router /wp-admin/options-general.php?page=torrouter3.3523.13

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
torrouter_torkeepalive
torrouter_port
torrouter_version
torrouter_firewall_exceptions_urls
torrouter_firewall_exceptions_plugins
torrouter_proxymode
torrouter_firewall
torrouter_host

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tor Router
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲2615.91 ▲0.375.92 ▲0.212.37 ▲0.04
Dashboard /wp-admin2,894 ▲336.14 ▼0.02125.61 ▼9.05160.19 ▼2.99
Posts /wp-admin/edit.php2,693 ▼13.24 ▲0.0062.05 ▲1.63139.69 ▼5.32
Add New Post /wp-admin/post-new.php1,664 ▼5315.78 ▼6.03395.00 ▼33.25152.86 ▼11.30
Media Library /wp-admin/upload.php1,700 ▼15.48 ▼0.04141.97 ▲1.08185.70 ▼1.81
Tor Router /wp-admin/options-general.php?page=torrouter1,2922.4152.71121.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • torrouter_version
    • torrouter_host
    • torrouter_firewall
    • torrouter_port
    • torrouter_firewall_exceptions_plugins
    • torrouter_firewall_exceptions_urls
    • torrouter_torkeepalive
    • torrouter_proxymode

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tor-router/tor-router.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: firewall, proxy, connection, proxies, socks...

tor-router/tor-router.php Passed 13 tests

This is the main PHP file of "Tor Router" version 1.4.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
62 characters long description:
Routes outgoing traffic through Tor or any HTTP / SOCKS Proxy.

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
Good job! No executable or dangerous file extensions detected535 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16358455
Bourne Shell14480

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin