83% amazon-link-engine

Code Review | Amazon Link Engine

WordPress plugin Amazon Link Engine scored83%from 54 tests.

About plugin

  • Plugin page: amazon-link-engine
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0
  • WordPress version: 6.3.1
  • First release: Sep 30, 2014
  • Latest release: Aug 2, 2022
  • Number of updates: 60
  • Update frequency: every 47.8 days
  • Top authors: GeoRiot (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

3,000+ active /82,986 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Amazon Link Engine
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.83 ▼3.38
Dashboard /wp-admin3.32 ▲0.0245.27 ▼12.46
Posts /wp-admin/edit.php3.37 ▲0.0249.24 ▲3.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.97 ▼8.55
Media Library /wp-admin/upload.php3.25 ▲0.0237.88 ▲3.77
Amazon Link Engine /wp-admin/options-general.php?page=amazon-link-engine3.3330.54

Server storage [IO: ▲1.17MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 17 new options
New WordPress options

Browser metrics Passed 4 tests

Amazon Link Engine: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲19413.75 ▼0.607.29 ▲5.5143.00 ▼1.86
Dashboard /wp-admin2,223 ▲325.83 ▲0.97105.69 ▲2.3639.96 ▼3.84
Posts /wp-admin/edit.php2,096 ▲102.06 ▲0.0639.59 ▲3.4235.33 ▲3.25
Add New Post /wp-admin/post-new.php1,517 ▲317.39 ▼0.19665.32 ▼17.1359.25 ▼27.06
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0298.79 ▲3.6142.15 ▲0.49
Amazon Link Engine /wp-admin/options-general.php?page=amazon-link-engine1,3041.7231.7043.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • genius_ale_install_date
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/amazon-link-engine/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/amazon-link-engine/amazon-link-engine.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Add an image for screenshot #1 (**The Results:** Each user gets sent to the correct item in their local store. This is an example of a user from the United States clicking your link. They’re sent to [amazon.com](http://www.amazon.com) with your US Associates ID attached.)
Please take inspiration from this readme.txt

amazon-link-engine/amazon-link-engine.php Passed 13 tests

The main PHP script in "Amazon Link Engine" version 1.4.1 is automatically included on every request by WordPress
114 characters long description:
Automatically optimizes Amazon product links for your global audience and allows you to earn commissions on sales.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin901 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions12100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 1.10MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png266.38KB75.76KB▼ 71.56%
screenshot-6.png278.24KB77.63KB▼ 72.10%
screenshot-2.png164.14KB43.93KB▼ 73.24%