78% link-juice-keeper

Code Review | Link Juice Keeper

WordPress plugin Link Juice Keeper scored78%from 54 tests.

About plugin

  • Plugin page: link-juice-keeper
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Apr 18, 2009
  • Latest release: Feb 10, 2023
  • Number of updates: 30
  • Update frequency: every 168.2 days
  • Top authors: sirzooro (53.33%)pattihis (50%)

Code review

54 tests

User reviews

12 reviews

Install metrics

20,000+ active /203,344 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼7.95ms] Passed 4 tests

Analyzing server-side resources used by Link Juice Keeper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.97 ▼0.38
Dashboard /wp-admin3.40 ▲0.0540.88 ▼18.25
Posts /wp-admin/edit.php3.49 ▲0.1444.99 ▼2.03
Add New Post /wp-admin/post-new.php6.11 ▲0.2276.66 ▼5.56
Media Library /wp-admin/upload.php3.33 ▲0.1131.21 ▼5.95
404 Logs /wp-admin/admin.php?page=link-juice-keeper-404-logs3.2841.57
Settings /wp-admin/admin.php?page=link-juice-keeper3.3434.80

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: 1 new table, 8 new options
New tables
wp_link_juice_keeper
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
ljk_db_version
ljk_main_settings
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Link Juice Keeper
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15313.80 ▼0.757.74 ▲6.2743.35 ▲2.78
Dashboard /wp-admin2,222 ▲485.61 ▼0.0693.68 ▲6.0236.85 ▼4.75
Posts /wp-admin/edit.php2,127 ▲272.03 ▲0.0049.92 ▲14.3836.04 ▲3.10
Add New Post /wp-admin/post-new.php1,549 ▲1223.15 ▲4.96663.42 ▲57.2558.29 ▼18.79
Media Library /wp-admin/upload.php1,427 ▲304.20 ▼0.1095.97 ▼1.1141.46 ▼0.56
404 Logs /wp-admin/admin.php?page=link-juice-keeper-404-logs1,0212.0424.6828.94
Settings /wp-admin/admin.php?page=link-juice-keeper1,0942.0123.6934.46

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/link-juice-keeper/public/partials/link-juice-keeper-public-display.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Link_Juice_Keeper_Logs' not found in wp-content/plugins/link-juice-keeper/admin/partials/link-juice-keeper-admin-display-logs.php:17
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/link-juice-keeper/admin/class-link-juice-keeper-logs.php on line 16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/link-juice-keeper/admin/class-link-juice-keeper-logs.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'Link_Juice_Keeper_Admin' not found in wp-content/plugins/link-juice-keeper/admin/partials/link-juice-keeper-admin-display.php:15
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/link-juice-keeper/admin/class-link-juice-keeper-logs.php on line 16

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: links, 404, link, redirect, error...

link-juice-keeper/link-juice-keeper.php 92% from 13 tests

Analyzing the main PHP file in "Link Juice Keeper" version 2.0.3
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected905 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP143541,230844
JavaScript272731
CSS23430

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods64
▷ Static methods34.69%
▷ Public methods4570.31%
▷ Protected methods23.12%
▷ Private methods1726.56%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin