72% link-library

Code Review | Link Library

WordPress plugin Link Library scored72%from 54 tests.

About plugin

  • Plugin page: link-library
  • Plugin version: 7.5.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2005
  • Latest release: Nov 26, 2023
  • Number of updates: 1,037
  • Update frequency: every 6.6 days
  • Top authors: jackdewey (100%)

Code review

54 tests

User reviews

93 reviews

Install metrics

10,000+ active /2,205,836 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.95MB] [CPU: ▲7.96ms] Passed 4 tests

An overview of server-side resources used by Link Library
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7647.25 ▲5.18
Dashboard /wp-admin5.76 ▲2.4063.24 ▼0.40
Posts /wp-admin/edit.php5.76 ▲2.3969.31 ▲18.91
Add New Post /wp-admin/post-new.php8.13 ▲2.23108.33 ▲8.67
Media Library /wp-admin/upload.php5.76 ▲2.5255.88 ▲18.38
Moderate /wp-admin/edit.php?post_type=link_library_links&page=link-library-moderate5.7652.20
Global Options /wp-admin/edit.php?post_type=link_library_links&page=link-library-general-options5.7655.77
All Links /wp-admin/edit.php?post_type=link_library_links5.7656.39
Add New /wp-admin/post-new.php?post_type=link_library_links5.7669.76
Link checking tools /wp-admin/edit.php?post_type=link_library_links&page=link-library-reciprocal5.7650.76
Library Configurations /wp-admin/edit.php?post_type=link_library_links&page=link-library-settingssets5.7651.29
Link Library Categories /wp-admin/edit-tags.php?taxonomy=link_library_category&post_type=link_library_links5.7652.08
FAQ /wp-admin/edit.php?post_type=link_library_links&page=link-library-faq5.7642.94
Tags /wp-admin/edit-tags.php?taxonomy=link_library_tags&post_type=link_library_links5.7657.64
Stylesheet /wp-admin/edit.php?post_type=link_library_links&page=link-library-stylesheet5.7648.94

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 188 new files
Database: no new tables, 10 new options
New WordPress options
LinkLibraryGeneral
LinkLibraryPP1
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_link_library
widget_recent-posts
LinkLibrary60Update
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Link Library
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,077 ▲33013.57 ▼0.7711.14 ▲9.4743.15 ▼1.20
Dashboard /wp-admin2,325 ▲1515.60 ▲0.0694.25 ▼3.6775.98 ▲32.36
Posts /wp-admin/edit.php2,212 ▲1122.13 ▲0.1540.61 ▲0.0236.07 ▲4.39
Add New Post /wp-admin/post-new.php6,455 ▲4,92928.13 ▲4.90860.49 ▲262.5838.70 ▼10.76
Media Library /wp-admin/upload.php1,506 ▲1034.18 ▼0.0497.80 ▼20.0473.21 ▲28.72
Moderate /wp-admin/edit.php?post_type=link_library_links&page=link-library-moderate1,1012.2843.2930.04
Global Options /wp-admin/edit.php?post_type=link_library_links&page=link-library-general-options3,7416.91181.5170.40
All Links /wp-admin/edit.php?post_type=link_library_links1,3002.0735.2335.21
Add New /wp-admin/post-new.php?post_type=link_library_links3,4338.87211.01147.75
Link checking tools /wp-admin/edit.php?post_type=link_library_links&page=link-library-reciprocal1,2452.3138.6127.53
Library Configurations /wp-admin/edit.php?post_type=link_library_links&page=link-library-settingssets6,0004.26119.2868.58
Link Library Categories /wp-admin/edit-tags.php?taxonomy=link_library_category&post_type=link_library_links1,4222.4128.7537.14
FAQ /wp-admin/edit.php?post_type=link_library_links&page=link-library-faq2,7806.75204.3270.17
Tags /wp-admin/edit-tags.php?taxonomy=link_library_tags&post_type=link_library_links1,3722.2635.6438.81
Stylesheet /wp-admin/edit.php?post_type=link_library_links&page=link-library-stylesheet1,5544.2798.8137.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_link_library
    • widget_theysaidso_widget
    • LinkLibrary60Update
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=link_library_links&page=link-library-settingssets
    • > Notice in wp-content/plugins/link-library/link-library-admin.php+4366
    Undefined index: rewritecategoriespage

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/link-library/captcha/easycaptcha.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/link-library/usersubmission.php:836
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/link-library/recaptcha/ReCaptcha/RequestMethod/SocketPost.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/link-library/link-library.php:40
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/link-library/recaptcha/ReCaptcha/RequestMethod/CurlPost.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/link-library/recaptcha/ReCaptcha/RequestMethod/Post.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (The Settings Panel used to configure the output of Link Library), #2 (A second sample output showing a list of links with RSS feed icons and RSS preview link.)
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
The official readme.txt is a good inspiration

link-library/link-library.php Passed 13 tests

This is the main PHP file of "Link Library" version 7.5.13, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
48 characters long description:
Display links on pages with a variety of options

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin33,762 lines of code in 112 files:
LanguageFilesBlank linesComment linesLines of code
PHP413,7674,35218,372
PO File84,4316,55110,088
JavaScript528538814,592
CSS812943621
XML21972
JSON10017

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 153)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity117.16
▷ Minimum class complexity1.00
▷ Maximum class complexity967.00
Average method complexity7.95
▷ Minimum method complexity1.00
▷ Maximum method complexity153.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods318
▷ Static methods20.63%
▷ Public methods318100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions66
▷ Named functions6496.97%
▷ Anonymous functions23.03%
Constants38
▷ Global constants3181.58%
▷ Class constants718.42%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
24 PNG files occupy 0.71MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/feed-icon-14x14.png0.67KB0.70KB0.00%
icons/next-16x16.png0.34KB0.33KB▼ 2.01%
icons/link-icon.png0.64KB0.69KB0.00%
icons/AccessibeLogoLarge.png32.20KB11.32KB▼ 64.86%
presets/Layout8-LinkMasonry.png128.74KB59.82KB▼ 53.54%