83% amz-watcher

Code Review | Amazon Affiliate Link Checker - AMZ Watcher

WordPress plugin Amazon Affiliate Link Checker - AMZ Watcher scored83%from 54 tests.

About plugin

  • Plugin page: amz-watcher
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4
  • WordPress version: 6.3.1
  • First release: Jul 2, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 23
  • Update frequency: every 37.9 days
  • Top authors: amzwatcher (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,474 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.42MB] [CPU: ▲3.11ms] Passed 4 tests

This is a short check of server-side resources used by Amazon Affiliate Link Checker - AMZ Watcher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4344.45 ▲2.32
Dashboard /wp-admin3.75 ▲0.4546.64 ▼3.56
Posts /wp-admin/edit.php3.80 ▲0.4451.71 ▲9.45
Add New Post /wp-admin/post-new.php6.33 ▲0.4496.65 ▲15.21
Media Library /wp-admin/upload.php3.61 ▲0.3838.02 ▲4.24

Server storage [IO: ▲20.20MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 43 new files
Database: 5 new tables, 9 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

Amazon Affiliate Link Checker - AMZ Watcher: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲2514.25 ▼0.071.70 ▼0.2543.86 ▼2.61
Dashboard /wp-admin2,205 ▲285.52 ▼0.0895.92 ▼0.4170.79 ▲23.32
Posts /wp-admin/edit.php2,125 ▲251.97 ▲0.0337.82 ▲0.9834.39 ▼2.17
Add New Post /wp-admin/post-new.php1,546 ▲2023.12 ▲0.08691.08 ▲103.9052.55 ▲2.75
Media Library /wp-admin/upload.php1,422 ▲224.11 ▼0.0895.29 ▼3.2479.69 ▲37.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • amzw_settings_widget_enabled
    • amzw_failed_fetch
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/amz-watcher/assets/includes/Widget.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/amz-watcher/includes/Widget.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
8 plugin tags: amazon, link alert, amazon affiliate plugin, amazon associates, affiliate plugin...

amz-watcher/amzwatcher.php 77% from 13 tests

The primary PHP file in "Amazon Affiliate Link Checker - AMZ Watcher" version 1.0.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("amz-watcher.php" instead of "amzwatcher.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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 detected2,203 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code

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.20
Average class complexity14.50
▷ Minimum class complexity2.00
▷ Maximum class complexity85.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
▷ Static methods2612.50%
▷ Public methods18287.50%
▷ Protected methods00.00%
▷ Private methods2612.50%
▷ Named functions1083.33%
▷ Anonymous functions216.67%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/amz.png16.40KB6.67KB▼ 59.31%