73% better-links

Code Review | Better Links

WordPress plugin Better Links scored 73% from 54 tests.

About plugin

  • Plugin page: better-links
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-3.9.2
  • WordPress version: 6.3.1
  • First release: Jun 19, 2014
  • Latest release: Aug 12, 2014
  • Number of updates: 12
  • Update frequency: every 4.6 days
  • Top authors: nickohrn (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 8,477 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.12ms] Passed 4 tests

An overview of server-side resources used by Better Links
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.11 ▼4.43
Dashboard /wp-admin3.42 ▲0.1147.05 ▼0.92
Posts /wp-admin/edit.php3.47 ▲0.1149.50 ▲3.85
Add New Post /wp-admin/post-new.php6.02 ▲0.1393.63 ▲9.63
Media Library /wp-admin/upload.php3.34 ▲0.1136.65 ▲1.04
Settings /wp-admin/edit.php?post_type=better-link&page=better-links-settings3.3431.88
Add New /wp-admin/post-new.php?post_type=better-link3.4449.80
Why Pro? /wp-admin/edit.php?post_type=better-link&page=better-links-pro3.1521.17
Link Tools /wp-admin/edit.php?post_type=better-link&page=better-links-tools3.3533.24
Link Categories /wp-admin/edit-tags.php?taxonomy=better-link-category&post_type=better-link3.3333.44
Link Dashboard /wp-admin/edit.php?post_type=better-link3.3938.98

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲16513.67 ▼0.711.82 ▼0.1743.50 ▼0.45
Dashboard /wp-admin2,278 ▲875.81 ▼0.0996.47 ▼3.5438.68 ▼3.98
Posts /wp-admin/edit.php2,167 ▲752.18 ▲0.1742.13 ▲7.5036.22 ▲3.75
Add New Post /wp-admin/post-new.php1,557 ▲4323.33 ▲5.84619.86 ▼65.0854.78 ▼3.99
Media Library /wp-admin/upload.php1,466 ▲814.23 ▼0.0697.82 ▼1.6945.12 ▼0.03
Settings /wp-admin/edit.php?post_type=better-link&page=better-links-settings9591.9232.9528.60
Add New /wp-admin/post-new.php?post_type=better-link1,6052.7652.9934.91
Why Pro? /wp-admin/edit.php?post_type=better-link&page=better-links-pro340.440.076.25
Link Tools /wp-admin/edit.php?post_type=better-link&page=better-links-tools9221.8426.5329.77
Link Categories /wp-admin/edit-tags.php?taxonomy=better-link-category&post_type=better-link1,3332.1526.5227.55
Link Dashboard /wp-admin/edit.php?post_type=better-link1,1612.3633.4027.59

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/better-links/modules/better-links-tracking/views/backend/meta-boxes/full-stats.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links/views/backend/sections/defaults.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links/views/backend/popup/process.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links-tracking/views/backend/pages/tools.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/better-links/modules/better-links/views/backend/meta-boxes/redirect-type.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links/views/backend/meta-boxes/urls.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links/views/backend/meta-boxes/actions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links/views/backend/meta-boxes/attributes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links/views/backend/nags/edit.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/better-links/modules/better-links/views/backend/meta-boxes/basics.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/better-links/modules/better-links/views/backend/fields/redirect-type.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=better-link&page=better-links-pro
    • > Network (severe)
    https://betterlinkspro.com/why-pro/?utm_source=betterlinksplugin&utm_medium=link&utm_campaign=betterlinkspluginsidebar - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: admin, links, editor

better-links/better-links.php Passed 13 tests

"Better Links" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
59 characters long description:
Quickly and easily create a variety of links for your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,067 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP18487521,626
JavaScript37722374
CSS118167

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity86.00
▷ Minimum class complexity36.00
▷ Maximum class complexity136.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods114
▷ Static methods114100.00%
▷ Public methods7969.30%
▷ Protected methods00.00%
▷ Private methods3530.70%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants211.76%
▷ Class constants1588.24%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin