77% wp-link-bio

Code Review | WP Link Bio

WordPress plugin WP Link Bio scored 77% from 54 tests.

About plugin

  • Plugin page: wp-link-bio
  • Plugin version: 1.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 5.9.2
  • First release: Jul 5, 2019
  • Latest release: Mar 30, 2021
  • Number of updates: 28
  • Update frequency: every 22.7 days
  • Top authors: cadudecastroalves (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active / 5,608 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.14MB] [CPU: ▼292.70ms] Passed 4 tests

An overview of server-side resources used by WP Link Bio
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /8.04 ▲4.5276.98 ▲22.65
Dashboard /wp-admin8.06 ▲4.6558.03 ▲18.20
Posts /wp-admin/edit.php8.06 ▲4.4163.30 ▲22.16
Add New Post /wp-admin/post-new.php9.94 ▲2.96118.91 ▼1,233.82
Media Library /wp-admin/upload.php8.06 ▲4.7654.06 ▲27.87
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius8.0644.79

Server storage [IO: ▲7.05MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 538 new files
Database: no new tables, 5 new options
New WordPress options
fs_debug_mode
fs_active_plugins
fs_api_cache
fs_accounts
fs_gdpr

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Link Bio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲6615.55 ▼0.035.92 ▼0.292.09 ▼0.61
Dashboard /wp-admin2,944 ▲836.15 ▲0.02118.16 ▼18.41243.88 ▲82.47
Posts /wp-admin/edit.php2,740 ▲493.23 ▼0.0264.05 ▼2.44212.97 ▲64.34
Add New Post /wp-admin/post-new.php1,714 ▲4221.18 ▲0.14454.05 ▲28.63157.70 ▼48.29
Media Library /wp-admin/upload.php1,750 ▲525.63 ▲0.10135.39 ▼3.42200.25 ▼51.80
Freemius Debug [v.2.3.0] /wp-admin/admin.php?page=freemius1,4822.5155.15186.42

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 5 options in the database
    • fs_gdpr
    • fs_accounts
    • fs_active_plugins
    • fs_api_cache
    • fs_debug_mode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-link-bio/freemius/templates/ajax-loader.php
  • 55× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-link-bio/wp-link-bio.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/CMB2_Field.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-link-bio/templates/header.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Select' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/types/CMB2_Type_Select_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wp-link-bio/includes/cmb2/includes/types/CMB2_Type_Radio.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

wp-link-bio/wp-link-bio.php 92% from 13 tests

Analyzing the main PHP file in "WP Link Bio" version 1.4.4
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin88,883 lines of code in 337 files:
LanguageFilesBlank linesComment linesLines of code
PO File13020,02525,41544,881
PHP1668,95821,70036,439
CSS253071,2064,859
JavaScript124406531,877
Markdown42770827

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,609)
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity44.55
▷ Minimum class complexity1.00
▷ Maximum class complexity2,609.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes113
▷ Abstract classes119.73%
▷ Concrete classes10290.27%
▷ Final classes00.00%
Methods1,618
▷ Static methods25916.01%
▷ Public methods1,19573.86%
▷ Protected methods1046.43%
▷ Private methods31919.72%
Functions174
▷ Named functions17399.43%
▷ Anonymous functions10.57%
Constants129
▷ Global constants10077.52%
▷ Class constants2922.48%
▷ Public constants29100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
27 PNG files occupy 0.70MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
images/placeholder.png2.40KB2.57KB0.00%
assets/icon-128x128.png3.88KB2.16KB▼ 44.15%
includes/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
includes/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%