84% affiliatex

Code Review | AffiliateX - Best Amazon Affiliate WordPress Plugin

WordPress plugin AffiliateX - Best Amazon Affiliate WordPress Plugin scored84%from 54 tests.

About plugin

  • Plugin page: affiliatex
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Nov 27, 2021
  • Latest release: May 31, 2023
  • Number of updates: 21
  • Update frequency: every 26.2 days
  • Top authors: kraftplugins (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10,000+ active /108,114 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼6.76ms] Passed 4 tests

Server-side resources used by AffiliateX - Best Amazon Affiliate WordPress Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3643.38 ▼1.58
Dashboard /wp-admin3.66 ▲0.3148.15 ▼15.66
Posts /wp-admin/edit.php3.71 ▲0.3553.97 ▲1.95
Add New Post /wp-admin/post-new.php6.13 ▲0.2486.89 ▼11.73
Media Library /wp-admin/upload.php3.52 ▲0.2938.59 ▲5.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for AffiliateX - Best Amazon Affiliate WordPress Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4214.34 ▲0.191.79 ▼0.1041.39 ▲2.12
Dashboard /wp-admin2,237 ▲605.63 ▼0.0294.92 ▼0.7636.71 ▼2.11
Posts /wp-admin/edit.php2,139 ▲362.14 ▲0.1339.35 ▼1.5934.64 ▼4.82
Add New Post /wp-admin/post-new.php6,394 ▲4,85730.10 ▲11.88965.09 ▲327.6040.04 ▼26.88
Media Library /wp-admin/upload.php1,443 ▲494.18 ▲0.0099.72 ▼3.2143.92 ▲1.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliatex/includes/classes/class-ab-fonts-manager.php:845

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
5 plugin tags: affiliates, affiliate marketing, amazon affiliate, gutenberg, affiliate plugin

affiliatex/affiliatex.php 92% from 13 tests

The main file in "AffiliateX - Best Amazon Affiliate WordPress Plugin" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin57,716 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript7788428529,807
CSS202,8496110,043
Sass151,091488,782
PHP367498545,142
SVG4003,936
JSON2006

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 380)
Cyclomatic complexity
Average complexity per logical line of code2.90
Average class complexity129.57
▷ Minimum class complexity1.00
▷ Maximum class complexity834.00
Average method complexity19.85
▷ Minimum method complexity1.00
▷ Maximum method complexity380.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes14.76%
Methods147
▷ Static methods7752.38%
▷ Public methods13793.20%
▷ Protected methods00.00%
▷ Private methods106.80%
Functions17
▷ Named functions1270.59%
▷ Anonymous functions529.41%
Constants8
▷ Global constants8100.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
There are no PNG files in this plugin