93% related-products-for-amazon

Code Review | Related Products For Amazon

WordPress plugin Related Products For Amazon scored 93% from 54 tests.

About plugin

  • Plugin page: related-products-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 5.8.1
  • First release: Jan 3, 2016
  • Latest release: Jan 3, 2016
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: tadas.poc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 1,718 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.47ms] Passed 4 tests

Analyzing server-side resources used by Related Products For Amazon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1335.81 ▲8.29
Dashboard /wp-admin3.07 ▲0.0250.67 ▲3.27
Posts /wp-admin/edit.php3.12 ▲0.0248.28 ▼0.18
Add New Post /wp-admin/post-new.php5.43 ▼0.0096.59 ▼574.52
Media Library /wp-admin/upload.php3.02 ▲0.0135.49 ▲1.54
Related Products for Amazon /wp-admin/options-general.php?page=related-products-for-amazon/amazonassociatesshowrelated.php2.9930.26

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Related Products For Amazon: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.81 ▲0.197.32 ▼1.2947.73 ▼3.35
Dashboard /wp-admin2,978 ▲445.90 ▼0.10139.90 ▼10.84128.10 ▲10.03
Posts /wp-admin/edit.php2,741 ▲52.82 ▲0.0163.02 ▼2.8487.80 ▼4.98
Add New Post /wp-admin/post-new.php1,686 ▲318.73 ▲0.24402.05 ▲7.09112.95 ▼4.81
Media Library /wp-admin/upload.php1,812 ▲25.04 ▲0.01153.07 ▼10.67128.48 ▲5.25
Related Products for Amazon /wp-admin/options-general.php?page=related-products-for-amazon/amazonassociatesshowrelated.php1,0712.1856.4773.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/related-products-for-amazon/amazonassociatesshowrelated.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Administration panel.), #2 (Widget display example.), #3 (Short code placing example.)
Please take inspiration from this readme.txt

related-products-for-amazon/amazonassociatesshowrelated.php 85% from 13 tests

"Related Products For Amazon" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 252 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("related-products-for-amazon.php" instead of "amazonassociatesshowrelated.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin71 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114871

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin