84% katracker

Code Review | KaTracker

WordPress plugin KaTracker scored84%from 54 tests.

About plugin

  • Plugin page: katracker
  • Plugin version: 1.1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Apr 18, 2016
  • Latest release: Feb 12, 2018
  • Number of updates: 47
  • Update frequency: every 14.2 days
  • Top authors: xnicoco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,673 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.86ms] Passed 4 tests

Server-side resources used by KaTracker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.62 ▼6.36
Dashboard /wp-admin3.44 ▲0.1448.49 ▼7.58
Posts /wp-admin/edit.php3.55 ▲0.2051.44 ▼1.89
Add New Post /wp-admin/post-new.php6.04 ▲0.1692.98 ▼3.61
Media Library /wp-admin/upload.php3.36 ▲0.1340.93 ▲3.76
Categories /wp-admin/edit-tags.php?taxonomy=torrent-category&post_type=attachment3.4540.68
Torrents /wp-admin/upload.php?page=admin-torrents3.1430.22
KaTracker /wp-admin/options-general.php?page=katracker3.3531.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 36 new files
Database: 1 new table, 27 new options
New tables
wp_tracker_peers
New WordPress options
katracker_subdomain
katracker_max-peers
katracker_tracked-access
katracker_default-announce
widget_theysaidso_widget
katracker_validate-hash
db_upgraded
katracker_min-interval
katracker_external-ip
katracker_reset-comment
...

Browser metrics Passed 4 tests

KaTracker: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4713.64 ▼0.721.86 ▼0.1644.46 ▲0.50
Dashboard /wp-admin2,227 ▲365.87 ▲0.9598.95 ▼8.8441.24 ▼1.85
Posts /wp-admin/edit.php2,107 ▲182.02 ▼0.0137.85 ▼4.2534.26 ▼6.27
Add New Post /wp-admin/post-new.php1,529 ▼423.70 ▲0.24636.91 ▼65.4052.10 ▲1.45
Media Library /wp-admin/upload.php1,408 ▲234.25 ▼0.00101.99 ▼7.2441.92 ▼4.25
Categories /wp-admin/edit-tags.php?taxonomy=torrent-category&post_type=attachment1,2912.1526.7027.30
Torrents /wp-admin/upload.php?page=admin-torrents1,4324.3680.9938.23
KaTracker /wp-admin/options-general.php?page=katracker8762.2023.7334.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_katracker_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 22× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/katracker/admin/section-9-reset.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/katracker/admin/section-2-tracker.php:8
    • > PHP Notice
      Trying to get property 'base_prefix' of non-object in wp-content/plugins/katracker/constants.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/katracker/torrent/torrent-media.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_katracker_option() in wp-content/plugins/katracker/tracker/katracker.core.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_torrents() in wp-content/plugins/katracker/widget/katracker-widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/katracker/uninstall.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/katracker/widget/widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/katracker/admin/section-3-torrent.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_all_actions() in wp-content/plugins/katracker/tracker/tracker-feed.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #3, #5 in katracker/assets to your readme.txt
The official readme.txt is a good inspiration

katracker/katracker.php 92% from 13 tests

"KaTracker" version 1.1.12's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,466 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP254279282,366
JavaScript3192461
CSS29039

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity52.67
▷ Minimum class complexity9.00
▷ Maximum class complexity120.00
Average method complexity3.35
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods66
▷ Static methods3857.58%
▷ Public methods4466.67%
▷ Protected methods913.64%
▷ Private methods1319.70%
Functions104
▷ Named functions3432.69%
▷ Anonymous functions7067.31%
Constants10
▷ Global constants990.00%
▷ Class constants110.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
torrent/media-torrent.png0.26KB0.25KB▼ 4.91%
admin/SettingsLogo.png3.88KB3.62KB▼ 6.64%