90% disclosure-for-amazon-affiliate

Code Review | Disclosure for Amazon Affiliate

WordPress plugin Disclosure for Amazon Affiliate scored90%from 54 tests.

About plugin

  • Plugin page: disclosure-for-am...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2020
  • Latest release: Mar 22, 2020
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: JonHaver (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /5,149 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.36ms] Passed 4 tests

A check of server-side resources used by Disclosure for Amazon Affiliate
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0443.33 ▲2.63
Dashboard /wp-admin3.40 ▲0.0149.94 ▼13.51
Posts /wp-admin/edit.php3.51 ▲0.1152.38 ▼1.16
Add New Post /wp-admin/post-new.php5.98 ▲0.0598.50 ▼8.82
Media Library /wp-admin/upload.php3.32 ▲0.0538.27 ▲2.07
Affiliate Disclosure /wp-admin/options-general.php?page=affiliate-disclosure-options3.3334.55

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disclosure for Amazon Affiliate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.73 ▲0.351.52 ▼0.1441.97 ▲1.76
Dashboard /wp-admin2,202 ▲255.57 ▲0.0295.80 ▲3.0940.90 ▲0.28
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0041.44 ▲5.1936.17 ▲1.67
Add New Post /wp-admin/post-new.php6,275 ▲4,74926.09 ▲2.64870.94 ▲221.2754.99 ▼3.00
Media Library /wp-admin/upload.php1,401 ▲44.23 ▲0.04108.10 ▲2.5246.22 ▲1.62
Affiliate Disclosure /wp-admin/options-general.php?page=affiliate-disclosure-options1,6667.00155.6979.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: disclosure, amazon affiliate, affiliate, associates, ftc

disclosure-for-amazon-affiliate/index.php 92% from 13 tests

Analyzing the main PHP file in "Disclosure for Amazon Affiliate" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("disclosure-for-amazon-affiliate.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin252 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17510232
CSS10020

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ 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
No PNG images were found in this plugin