10% avantlink-wp

Code Review | AvantLink Ad Tools for Affiliates

WordPress plugin AvantLink Ad Tools for Affiliates scored 10% from 54 tests.

About plugin

  • Plugin page: avantlink-wp
  • Plugin version: 1.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.9
  • WordPress version: 5.9.2
  • First release: Feb 24, 2011
  • Latest release: Jan 31, 2022
  • Number of updates: 42
  • Update frequency: every 95.1 days
  • Top authors: avantlink (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 12,926 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/avantlink-wp/avantlink-wp.php+397
    Methods with the same name as their class will not be constructors in a future version of PHP; Avantlink has a deprecated constructor

Server metrics [RAM: ▼2.41MB] [CPU: ▼343.56ms] Passed 4 tests

A check of server-side resources used by AvantLink Ad Tools for Affiliates
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.96 ▼1.554.82 ▼45.59
Dashboard /wp-admin1.98 ▼1.434.32 ▼30.16
Posts /wp-admin/edit.php1.98 ▼1.664.51 ▼33.80
Add New Post /wp-admin/post-new.php1.98 ▼4.994.09 ▼1,264.67
Media Library /wp-admin/upload.php1.98 ▼1.315.38 ▼27.60
AvantLink Tools /wp-admin/options-general.php?page=avantlink-wp1.984.25

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AvantLink Ad Tools for Affiliates
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲8915.61 ▼0.416.06 ▲0.282.62 ▲0.17
Dashboard /wp-admin2,930 ▲696.22 ▲0.00117.14 ▼17.01174.97 ▲13.47
Posts /wp-admin/edit.php2,739 ▲513.11 ▼0.1362.82 ▼2.10146.87 ▲8.13
Add New Post /wp-admin/post-new.php1,974 ▲22222.74 ▲1.00441.30 ▼47.93184.78 ▼102.22
Media Library /wp-admin/upload.php1,733 ▲385.54 ▼0.02129.27 ▼20.12206.13 ▲13.46
AvantLink Tools /wp-admin/options-general.php?page=avantlink-wp1,1222.8556.02143.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/avantlink-wp/avantlink-wp.php+397
    Methods with the same name as their class will not be constructors in a future version of PHP; Avantlink has a deprecated constructor

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > Deprecated in wp-content/plugins/avantlink-wp/avantlink-wp.php+397
    Methods with the same name as their class will not be constructors in a future version of PHP; Avantlink has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_deregister_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-core handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_deregister_script was called incorrectly. Do not deregister the jquery-ui-core script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_deregister_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-tabs handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_deregister_script was called incorrectly. Do not deregister the jquery-ui-tabs script in the administration area. To target the front-end theme, use the wp_enqueue_scripts hook. Please see Debugging in WordPress for more information. (This message was added in version 3.6.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the avantlink-jquery-ui handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > User notice in wp-includes/functions.php+5768
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the avantlink-admin-tabs handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > Deprecated in wp-content/plugins/avantlink-wp/avantlink-wp.php+423
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > Deprecated in wp-content/plugins/avantlink-wp/lib/shortcodes.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; Avantlink_shortcodes has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=avantlink-wp
    • > Deprecated in wp-content/plugins/avantlink-wp/tinymce/tinymce.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; add_avantlink_button has a deprecated constructor

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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/avantlink-wp/post-ad-tool-form.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avantlink-wp/avantlink-wp.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avantlink-wp/meta-box-rp.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avantlink-wp/widget-product-ad-widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/avantlink-wp/tinymce/tinymce.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avantlink-wp/widget-search-form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avantlink-wp/widget-related-products.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/avantlink-wp/lib/shortcodes.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avantlink-wp/meta-box-ad-widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avantlink-wp/widget-ad-tool.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
Please take inspiration from this readme.txt

avantlink-wp/avantlink-wp.php 92% from 13 tests

The primary PHP file in "AvantLink Ad Tools for Affiliates" version 1.0.15 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 451 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,249 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP155104191,500
JavaScript716181427
CSS33372270
SVG20152

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity5.57
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/smoothness/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
css/smoothness/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
assets/icon-128x128.png16.38KB3.09KB▼ 81.12%
css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
css/smoothness/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%