10% links-auto-replacer

Code Review | Keywords to Links Converter

WordPress plugin Keywords to Links Converter scored10%from 54 tests.

About plugin

  • Plugin page: links-auto-replacer
  • Plugin version: 2.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Oct 21, 2014
  • Latest release: Aug 8, 2022
  • Number of updates: 87
  • Update frequency: every 32.7 days
  • Top authors: waseem_senjer (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /36,479 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/links-auto-replacer/admin/classes/class.base62.php+25
    Uncaught Error: Call to undefined function bccomp() in wp-content/plugins/links-auto-replacer/admin/classes/class.base62.php:25
    Stack trace:
    #0 wp-content/plugins/links-auto-replacer/admin/class-lar-admin.php(61): base62::encode()
    #1 wp-content/plugins/links-auto-replacer/includes/class-lar.php(181): Links_Auto_Replacer_Admin->__construct()
    #2 wp-content/plugins/links-auto-replacer/includes/class-lar.php(76): Links_Auto_Replacer->define_admin_hooks()
    #3 wp-content/plugins/links-auto-replacer/links-auto-replacer.php(77): Links_Auto_Replacer->__construct()
    #4 wp-content/plugins/links-auto-replacer/links-auto-replacer.php(81): run_Links_Auto_Replacer()
    #5 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #6 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.02ms] Passed 4 tests

Server-side resources used by Keywords to Links Converter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.44 ▼2.20
Dashboard /wp-admin3.31 ▲0.0060.95 ▲13.39
Posts /wp-admin/edit.php3.36 ▲0.0044.70 ▲1.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.70 ▼7.99
Media Library /wp-admin/upload.php3.23 ▲0.0033.30 ▼3.64

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 194 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Keywords to Links Converter: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.21 ▼0.341.72 ▼0.0637.24 ▼2.83
Dashboard /wp-admin2,192 ▲125.50 ▼0.0781.07 ▼9.4939.07 ▼1.80
Posts /wp-admin/edit.php2,100 ▼02.08 ▲0.1336.10 ▲0.3433.08 ▼3.30
Add New Post /wp-admin/post-new.php1,526 ▼023.15 ▼0.08627.20 ▼45.3459.61 ▲2.84
Media Library /wp-admin/upload.php1,400 ▲34.21 ▲0.0395.34 ▼9.3941.60 ▼7.35

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/links-auto-replacer/public/partials/lar-public-display.php
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/links-auto-replacer/admin/cmb/init.php:85
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/links-auto-replacer/admin/partials/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/links-auto-replacer/admin/partials/license.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/links-auto-replacer/admin/partials/about.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/links-auto-replacer/admin/cmb/example-functions.php:53
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/links-auto-replacer/admin/partials/menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/links-auto-replacer/admin/cmb/bootstrap.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/links-auto-replacer/links-auto-replacer.php:29
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/links-auto-replacer/admin/partials/upgrade.php:1

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: keywords, links, convert keywords, marketing, affiliate...

links-auto-replacer/links-auto-replacer.php Passed 13 tests

Analyzing the main PHP file in "Keywords to Links Converter" version 2.2.3
49 characters long description:
Auto replace your affiliate links and track them.

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
No dangerous file extensions were detected28,095 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PO File948,84811,76420,245
PHP331,2962,5033,802
CSS39815092,125
Sass9158241,069
JavaScript6222215854

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity28.68
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods244
▷ Static methods218.61%
▷ Public methods22793.03%
▷ Protected methods31.23%
▷ Private methods145.74%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.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
21 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/cmb/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
admin/cmb/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
admin/cmb/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
admin/cmb/images/ico-delete.png0.70KB0.72KB0.00%
admin/cmb/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%