84% traktivity

Code Review | Traktivity

WordPress plugin Traktivity scored 84% from 54 tests.

About plugin

  • Plugin page: traktivity
  • Plugin version: 2.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 23, 2017
  • Latest release: Sep 5, 2023
  • Number of updates: 44
  • Update frequency: every 54.9 days
  • Top authors: jeherve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,406 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

A check of server-side resources used by Traktivity
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4141.51 ▼3.82
Dashboard /wp-admin3.73 ▲0.4352.61 ▲3.47
Posts /wp-admin/edit.php3.84 ▲0.4956.09 ▲10.52
Add New Post /wp-admin/post-new.php6.61 ▲0.7299.82 ▼0.37
Media Library /wp-admin/upload.php3.65 ▲0.4240.08 ▲1.23
Year /wp-admin/edit-tags.php?taxonomy=trakt_year&post_type=traktivity_event3.6541.15
Genre /wp-admin/edit-tags.php?taxonomy=trakt_genre&post_type=traktivity_event3.6538.23
Episode Numbers /wp-admin/edit-tags.php?taxonomy=trakt_episode&post_type=traktivity_event3.6539.56
Dashboard /wp-admin/edit.php?post_type=traktivity_event&page=traktivity_dashboard3.6335.20
Season /wp-admin/edit-tags.php?taxonomy=trakt_season&post_type=traktivity_event3.6539.00
Show /wp-admin/edit-tags.php?taxonomy=trakt_show&post_type=traktivity_event3.6537.65
All Trakt.tv Events /wp-admin/edit.php?post_type=traktivity_event3.7039.84
Type /wp-admin/edit-tags.php?taxonomy=trakt_type&post_type=traktivity_event3.6534.56

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_traktivity_list_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Traktivity
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲11214.77 ▲0.381.53 ▼0.6641.06 ▼11.04
Dashboard /wp-admin2,253 ▲624.84 ▼1.07111.71 ▲11.6740.50 ▲3.54
Posts /wp-admin/edit.php2,136 ▲472.06 ▲0.0637.42 ▼2.4833.48 ▼0.06
Add New Post /wp-admin/post-new.php1,574 ▲6020.85 ▲3.34663.53 ▲2.7159.94 ▲9.14
Media Library /wp-admin/upload.php1,438 ▲534.16 ▼0.04117.93 ▲11.3952.37 ▲1.90
Year /wp-admin/edit-tags.php?taxonomy=trakt_year&post_type=traktivity_event1,2812.1433.7831.28
Genre /wp-admin/edit-tags.php?taxonomy=trakt_genre&post_type=traktivity_event1,2812.1331.4831.24
Episode Numbers /wp-admin/edit-tags.php?taxonomy=trakt_episode&post_type=traktivity_event1,2812.1330.1529.43
Dashboard /wp-admin/edit.php?post_type=traktivity_event&page=traktivity_dashboard8453.0555.4530.79
Season /wp-admin/edit-tags.php?taxonomy=trakt_season&post_type=traktivity_event1,2782.1429.7325.98
Show /wp-admin/edit-tags.php?taxonomy=trakt_show&post_type=traktivity_event1,3102.1431.4729.92
All Trakt.tv Events /wp-admin/edit.php?post_type=traktivity_event1,1881.9432.4930.65
Type /wp-admin/edit-tags.php?taxonomy=trakt_type&post_type=traktivity_event1,2842.1327.1125.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_traktivity_list_widget

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
The following issues need your attention
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/traktivity/rest.traktivity.php
    • > /wp-content/plugins/traktivity/widgets/list-events.php
    • > /wp-content/plugins/traktivity/cpt.traktivity.php
    • > /wp-content/plugins/traktivity/core.traktivity.php
    • > /wp-content/plugins/traktivity/admin.traktivity.php
    • > /wp-content/plugins/traktivity/traktivity.php
    • > /wp-content/plugins/traktivity/stats.traktivity.php
    • > /wp-content/plugins/traktivity/content.traktivity.php

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: movies, tmdb, activity, log, trakttv...

traktivity/traktivity.php 92% from 13 tests

This is the main PHP file of "Traktivity" version 2.3.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,769 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP93169081,619
JSON200643
CSS24429232
Markdown1460218
JavaScript221957

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity25.86
▷ Minimum class complexity3.00
▷ Maximum class complexity81.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods4586.54%
▷ Protected methods00.00%
▷ Private methods713.46%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin