77% bittorrent

Code Review | BitTorrent My Blog

WordPress plugin BitTorrent My Blog scored77%from 54 tests.

About plugin

  • Plugin page: bittorrent
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2015
  • Latest release: Jan 23, 2015
  • Number of updates: 27
  • Update frequency: every 0.4 days
  • Top authors: meitar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,271 total downloads


Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.25MB] [CPU: ▼3.78ms] Passed 4 tests

An overview of server-side resources used by BitTorrent My Blog
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2439.41 ▼2.07
Dashboard /wp-admin3.65 ▲0.3050.71 ▼4.47
Posts /wp-admin/edit.php3.71 ▲0.3052.46 ▲3.74
Add New Post /wp-admin/post-new.php6.17 ▲0.2396.64 ▼9.14
Media Library /wp-admin/upload.php3.51 ▲0.2341.78 ▲0.58
BitTorrent my Blog /wp-admin/options-general.php?page=wp_bittorrent_settings3.4531.77

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

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/bittorrent/" and "wp-content/uploads/"
    • (new file) wp-content/wp-bittorrent-seeds/.empty
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

BitTorrent My Blog: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.29 ▼0.071.82 ▲0.1042.68 ▲0.07
Dashboard /wp-admin2,199 ▲225.65 ▼0.1487.29 ▲0.9641.76 ▼5.35
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0536.31 ▼3.5040.08 ▲7.70
Add New Post /wp-admin/post-new.php1,539 ▲1123.21 ▲2.23693.84 ▲1.1860.00 ▼3.63
Media Library /wp-admin/upload.php1,395 ▼84.17 ▲0.05102.14 ▼29.2845.87 ▼3.19
BitTorrent my Blog /wp-admin/options-general.php?page=wp_bittorrent_settings9621.9921.2133.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp_bittorrent_settings
    • > Notice in wp-content/plugins/bittorrent/wp-bittorrent.php+475
    Trying to access array offset on value of type bool
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_bittorrent_settings
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_bittorrent_settings
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bittorrent/wp-bittorrent.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bittorrent/templates/rss-torrent.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: file sharing, torrent, bittorrent, p2p

bittorrent/wp-bittorrent.php 77% from 13 tests

"BitTorrent My Blog" version 0.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 409 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bittorrent.php" instead of "wp-bittorrent.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin984 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity73.00
▷ Minimum class complexity5.00
▷ Maximum class complexity159.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods2734.18%
▷ Public methods4860.76%
▷ Protected methods911.39%
▷ Private methods2227.85%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin