94% filter-amazon-associates-links

Code Review | Filter for Amazon Associates links

WordPress plugin Filter for Amazon Associates links scored 94% from 54 tests.

About plugin

  • Plugin page: filter-amazon-ass...
  • Plugin version: 1.0
  • PHP compatiblity: 5.63+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 5.8.1
  • First release: Jun 21, 2019
  • Latest release: Jun 21, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: andy_moyle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 267 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼142.83ms] Passed 4 tests

Analyzing server-side resources used by Filter for Amazon Associates links
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1338.27 ▲11.57
Dashboard /wp-admin3.07 ▲0.0245.09 ▼0.78
Posts /wp-admin/edit.php3.13 ▲0.0241.67 ▼3.35
Add New Post /wp-admin/post-new.php5.43 ▼0.0092.49 ▼569.31
Media Library /wp-admin/upload.php3.02 ▲0.0234.62 ▲2.14
Filter Amazon Links /wp-admin/options-general.php?page=amazon-link-filter/index.php2.9928.51

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Filter for Amazon Associates links
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11216.02 ▲0.319.29 ▲0.5546.28 ▲1.50
Dashboard /wp-admin2,978 ▲475.88 ▼0.03133.74 ▼6.83111.88 ▲8.37
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0062.09 ▼1.5988.85 ▼1.00
Add New Post /wp-admin/post-new.php1,875 ▲20319.12 ▲0.23372.01 ▼13.33108.42 ▲4.92
Media Library /wp-admin/upload.php1,815 ▲25.02 ▲0.00149.01 ▲7.77121.49 ▼0.68
Filter Amazon Links /wp-admin/options-general.php?page=amazon-link-filter/index.php1,0632.1054.0874.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 add_filter() in wp-content/plugins/filter-amazon-associates-links/index.php:89

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: affiliate, amazon, email, feed

filter-amazon-associates-links/index.php 92% from 13 tests

This is the main PHP file of "Filter for Amazon Associates links" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("filter-amazon-associates-links.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected70 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1433470

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions6
▷ Named functions6100.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
No PNG files were detected