84% amazon-affiliate-change-to-smile-link

Code Review | WP Amazon Affiliate Change to Smile Links

WordPress plugin WP Amazon Affiliate Change to Smile Links scored84%from 54 tests.

About plugin

  • Plugin page: amazon-affiliate-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3
  • WordPress version: 6.3.1
  • First release: Nov 5, 2013
  • Latest release: Dec 3, 2019
  • Number of updates: 5
  • Update frequency: every 443.8 days
  • Top authors: tl3po (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,792 total downloads

Benchmarks

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

Server-side resources used by WP Amazon Affiliate Change to Smile Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.84 ▲3.02
Dashboard /wp-admin3.32 ▲0.0148.47 ▼2.44
Posts /wp-admin/edit.php3.37 ▲0.0152.55 ▲1.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.35 ▼9.67
Media Library /wp-admin/upload.php3.24 ▲0.0137.80 ▲0.62

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Amazon Affiliate Change to Smile Links
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.67 ▲0.322.11 ▲0.4644.06 ▲1.37
Dashboard /wp-admin2,198 ▲215.61 ▲0.0289.22 ▼2.6642.40 ▲4.77
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0140.25 ▼0.4736.63 ▲1.50
Add New Post /wp-admin/post-new.php1,528 ▲223.03 ▼0.10662.10 ▲1.1157.86 ▲13.22
Media Library /wp-admin/upload.php1,397 ▼64.22 ▲0.01100.57 ▼4.4345.70 ▲0.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/amazon-affiliate-change-to-smile-link/chg2smile.php:99

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
1 plugin tags: amazon affiliate smile

amazon-affiliate-change-to-smile-link/chg2smile.php 92% from 13 tests

"WP Amazon Affiliate Change to Smile Links" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("amazon-affiliate-change-to-smile-link.php" instead of "chg2smile.php")

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
There were no executable files found in this plugin45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP184745

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin