77% amazolinkenator

Code Review | AmazoLinkenator

WordPress plugin AmazoLinkenator scored77%from 54 tests.

About plugin

  • Plugin page: amazolinkenator
  • Plugin version: 4.21
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Dec 16, 2015
  • Latest release: Aug 10, 2023
  • Number of updates: 53
  • Update frequency: every 52.7 days
  • Top authors: rhellewell@gmail.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /5,179 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.88ms] Passed 4 tests

An overview of server-side resources used by AmazoLinkenator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.42 ▼6.94
Dashboard /wp-admin3.33 ▲0.0250.24 ▼0.20
Posts /wp-admin/edit.php3.38 ▲0.0248.34 ▲0.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0297.36 ▼12.53
Media Library /wp-admin/upload.php3.25 ▲0.0239.93 ▲5.63
AmazoLinkenator Settings /wp-admin/options-general.php?page=AZLNK_settings3.1932.42

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
AZLNK_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by AmazoLinkenator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.37 ▼0.992.18 ▲0.3342.43 ▼4.86
Dashboard /wp-admin2,215 ▲244.85 ▼1.0598.22 ▼5.1339.75 ▼3.38
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0441.61 ▲5.7135.13 ▲4.95
Add New Post /wp-admin/post-new.php1,542 ▲1418.14 ▼0.16644.06 ▼6.5161.03 ▲3.04
Media Library /wp-admin/upload.php1,394 ▲64.26 ▲0.07111.06 ▲3.5243.15 ▼3.48
AmazoLinkenator Settings /wp-admin/options-general.php?page=AZLNK_settings1,1802.0730.4650.55

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=AZLNK_settings
    • > Notice in wp-content/plugins/amazolinkenator/amazolinkenator.php+263
    Undefined index: AZLNK_enable_affiliator_posts
    • > GET request to /wp-admin/options-general.php?page=AZLNK_settings
    • > Notice in wp-content/plugins/amazolinkenator/amazolinkenator.php+271
    Undefined index: AZLNK_enable_comments
    • > GET request to /wp-admin/options-general.php?page=AZLNK_settings
    • > Notice in wp-content/plugins/amazolinkenator/amazolinkenator.php+279
    Undefined index: AZLNK_auto_shorten
    • > GET request to /wp-admin/options-general.php?page=AZLNK_settings
    • > Notice in wp-content/plugins/amazolinkenator/amazolinkenator.php+303
    Undefined index: AZLNK_donate_counter
    • > GET request to /wp-admin/options-general.php?page=AZLNK_settings
    • > Notice in wp-content/plugins/amazolinkenator/amazolinkenator.php+311
    Undefined index: AZLNK_affiliate_counter
    • > GET request to /wp-admin/options-general.php?page=AZLNK_settings
    • > Notice in wp-content/plugins/amazolinkenator/amazolinkenator.php+461
    Undefined index: testsettings

SRP 50% 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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/amazolinkenator/amazolinkenator.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: amazon affiliate links shorten urls

amazolinkenator/amazolinkenator.php 77% from 13 tests

The primary PHP file in "AmazoLinkenator" version 4.21 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.2" instead of "5.6")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 242 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin625 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP275154480
CSS1254133
XML20012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 3.14MB with 2.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1000x200.png598.76KB82.36KB▼ 86.24%
assets/icon-128x128.png220.90KB11.52KB▼ 94.78%
assets/icon-256x256.png573.05KB36.33KB▼ 93.66%
assets/icons8-check-mark-48.png1.09KB0.99KB▼ 8.63%
assets/curl-result.png4.43KB2.02KB▼ 54.31%