74% no-api-amazon-affiliate

Code Review | No API Amazon Affiliate

WordPress plugin No API Amazon Affiliate scored74%from 54 tests.

About plugin

  • Plugin page: no-api-amazon-aff...
  • Plugin version: 4.4.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2021
  • Latest release: Jan 22, 2023
  • Number of updates: 28
  • Update frequency: every 23.9 days
  • Top authors: eanton (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

2,000+ active /14,715 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.64MB] [CPU: ▲2.11ms] Passed 4 tests

Server-side resources used by No API Amazon Affiliate
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6046.80 ▲4.64
Dashboard /wp-admin4.01 ▲0.7047.68 ▼0.33
Posts /wp-admin/edit.php4.06 ▲0.7052.79 ▲5.01
Add New Post /wp-admin/post-new.php6.52 ▲0.6485.63 ▼0.89
Media Library /wp-admin/upload.php3.87 ▲0.6438.50 ▲6.47
Apariencia /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/options2.php3.9539.15
Ayuda /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/ayuda.php3.8634.29
Productos Amazon /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/items_amazon.php3.9034.68
Ajustes /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/options.php3.8937.58

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 38 new files
Database: 3 new tables, 7 new options
New tables
wp_naaa_item_amazon
wp_naaa_bestselleer_amazon
wp_naaa_other_link
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
naaa_plugin_version
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for No API Amazon Affiliate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12114.78 ▲0.412.01 ▲0.2443.89 ▼0.01
Dashboard /wp-admin2,239 ▲544.85 ▼1.0697.28 ▼17.9239.52 ▼3.56
Posts /wp-admin/edit.php2,125 ▲362.04 ▲0.0340.15 ▲0.4135.42 ▼4.46
Add New Post /wp-admin/post-new.php1,558 ▲4423.18 ▲5.68632.22 ▼57.7949.96 ▼0.37
Media Library /wp-admin/upload.php1,427 ▲394.18 ▼0.06100.71 ▼5.1942.02 ▼3.97
Apariencia /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/options2.php2,2983.1386.4529.84
Ayuda /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/ayuda.php1,0542.0123.8232.13
Productos Amazon /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/items_amazon.php1,1041.9527.4636.94
Ajustes /wp-admin/admin.php?page=no-api-amazon-affiliate/admin/options.php1,0862.0624.3025.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_naaa_other_link
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • naaa_plugin_version

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/no-api-amazon-affiliate/admin/items_amazon.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/no-api-amazon-affiliate/admin/ayuda.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/no-api-amazon-affiliate/admin/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/no-api-amazon-affiliate/admin/options2.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

no-api-amazon-affiliate/no-api-amazon-affiliate.php Passed 13 tests

The principal PHP file in "No API Amazon Affiliate" v. 4.4.0 is loaded by WordPress automatically on each request
107 characters long description:
Plugin de Afiliados de Amazon, SIN API. Crea bonitas cajas de productos de Amazon con tu Id de afiliación.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected20,084 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,7438411,053
JavaScript41,2944675,112
PHP96255883,612
Markdown1170248
XML20059

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity193.50
▷ Minimum class complexity138.00
▷ Maximum class complexity249.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions65
▷ Named functions65100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-menu.png1.58KB1.42KB▼ 10.22%
assets/images/prime-2x.png0.92KB0.67KB▼ 26.79%