10% bestazon

Code Review | Amazon Link Localization by BestAzon

WordPress plugin Amazon Link Localization by BestAzon scored10%from 54 tests.

About plugin

  • Plugin page: bestazon
  • Plugin version: 5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Jun 12, 2016
  • Latest release: Mar 23, 2021
  • Number of updates: 66
  • Update frequency: every 26.5 days
  • Top authors: awesomeaffiliateplugins (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

300+ active /26,642 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/bestazon/BestAzon.php+16
    Trying to access array offset on value of type bool

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

A check of server-side resources used by Amazon Link Localization by BestAzon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.23 ▲0.79
Dashboard /wp-admin3.42 ▲0.1246.17 ▼3.46
Posts /wp-admin/edit.php3.53 ▲0.1849.75 ▲7.49
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.86 ▼19.02
Media Library /wp-admin/upload.php3.34 ▲0.1135.67 ▼0.92
BestAzon /wp-admin/options-general.php?page=BestAzon3.2830.44

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Amazon Link Localization by BestAzon
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,020 ▲27414.05 ▼0.63206.07 ▲203.8541.89 ▼1.80
Dashboard /wp-admin2,236 ▲445.87 ▲0.86108.41 ▼2.0342.74 ▼0.23
Posts /wp-admin/edit.php2,119 ▲302.04 ▲0.0242.09 ▼4.3938.20 ▲4.19
Add New Post /wp-admin/post-new.php1,562 ▲3423.05 ▲4.99666.61 ▲42.4257.72 ▼6.02
Media Library /wp-admin/upload.php1,421 ▲334.23 ▲0.03101.85 ▼0.8445.35 ▲2.69
BestAzon /wp-admin/options-general.php?page=BestAzon1,1892.9781.3431.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/bestazon/BestAzon.php+24
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 42 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=BestAzon
    • > Notice in wp-content/plugins/bestazon/BestAzon.php+258
    Trying to access array offset on value of type bool
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=BestAzon
    • > Notice in wp-content/plugins/bestazon/BestAzon.php+252
    Undefined index: defaultvalue
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=BestAzon
    • > Notice in wp-content/plugins/bestazon/BestAzon.php+373
    Undefined index: supplemental
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=BestAzon
    • > Notice in wp-content/plugins/bestazon/BestAzon.php+369
    Undefined index: helper

SRP 50% 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/bestazon/BestAzon.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Donate link: Invalid url: ""
  • Screenshots: A description for screenshot #5 is missing in bestazon/assets to your readme.txt
You can take inspiration from this readme.txt

bestazon/BestAzon.php 85% from 13 tests

The main file in "Amazon Link Localization by BestAzon" v. 5.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 233 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bestazon.php" instead of "BestAzon.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin579 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11325497
CSS14070
JavaScript12012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/BestAzonLogo.png51.59KB18.90KB▼ 63.36%