77% affiliateimporteral

Code Review | AffiliateImporterAI

WordPress plugin AffiliateImporterAI scored77%from 54 tests.

About plugin

  • Plugin page: affiliateimporteral
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Dec 15, 2016
  • Latest release: Feb 24, 2018
  • Number of updates: 59
  • Update frequency: every 7.3 days
  • Top authors: cr1000 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

70+ active /22,539 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.20MB] [CPU: ▼2.36ms] 75% from 4 tests

Server-side resources used by AffiliateImporterAI
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 826.37ms on /wp-admin/admin.php?page=aeidn-schedule)
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3248.97 ▲12.46
Dashboard /wp-admin3.51 ▲0.1751.04 ▼7.91
Posts /wp-admin/edit.php3.57 ▲0.2145.63 ▲0.26
Add New Post /wp-admin/post-new.php6.11 ▲0.2285.16 ▼4.53
Media Library /wp-admin/upload.php3.43 ▲0.2038.18 ▲2.73
Shedule /wp-admin/admin.php?page=aeidn-schedule3.38826.37
Backup / Restore /wp-admin/admin.php?page=aeidn-backup3.32245.06
Add product /wp-admin/admin.php?page=aeidn-add3.3533.20
Status /wp-admin/admin.php?page=aeidn-status3.32454.20
Settings /wp-admin/admin.php?page=aeidn-settings3.32255.05
Dashboard /wp-admin/admin.php?page=aeidn3.32253.53
Statistics /wp-admin/admin.php?page=aeidn-stats3.32245.32

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 101 new files
Database: 7 new tables, 7 new options
New tables
wp_aeidn_goods_archive
wp_aeidn_blacklist
wp_aeidn_price_formula
wp_aeidn_goods
wp_aeidn_stats
wp_aeidn_log
wp_aeidn_account
New WordPress options
widget_recent-comments
db_upgraded
aeidn_db_version
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by AffiliateImporterAI
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲18413.69 ▼0.662.06 ▲0.3844.15 ▲2.56
Dashboard /wp-admin2,296 ▲1195.47 ▼0.0794.53 ▲9.9985.25 ▲46.44
Posts /wp-admin/edit.php2,199 ▲992.53 ▲0.5040.81 ▲5.7933.48 ▲0.85
Add New Post /wp-admin/post-new.php1,622 ▲9623.35 ▲0.45698.31 ▲39.6438.13 ▼20.42
Media Library /wp-admin/upload.php1,516 ▲1165.02 ▲0.81100.23 ▼11.3191.30 ▲43.73
Shedule /wp-admin/admin.php?page=aeidn-schedule1,0402.3532.7533.66
Backup / Restore /wp-admin/admin.php?page=aeidn-backup1,0772.6431.4743.62
Add product /wp-admin/admin.php?page=aeidn-add8952.1429.8524.95
Status /wp-admin/admin.php?page=aeidn-status9832.3332.6139.75
Settings /wp-admin/admin.php?page=aeidn-settings2,2012.2635.5963.44
Dashboard /wp-admin/admin.php?page=aeidn1,1742.6131.9850.69
Statistics /wp-admin/admin.php?page=aeidn-stats1,0442.4835.3559.45

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 were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • aeidn_db_version
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aeidn-stats
    • > Warning in wp-content/plugins/affiliateimporteral/layout/informer.php+7
    file_get_contents(https://cr1000team.com/wpad.json): failed to open stream: Connection refused
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aeidn-stats
    • > Warning in wp-content/plugins/affiliateimporteral/layout/informer.php+8
    count(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aeidn-settings
    • > Notice in wp-content/plugins/affiliateimporteral/src/AEIDN/Utils/Utils.php+88
    Undefined index: parent

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 fix the following
  • 31× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aeidn_get_api_list() in wp-content/plugins/affiliateimporteral/layout/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Dnolbon\\Wordpress\\WpListTable' not found in wp-content/plugins/affiliateimporteral/src/Dnolbon/Aeidn/Tables/BlacklistTable.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/affiliateimporteral/src/AEIDN/Modules/aliexpress/layout/settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/affiliateimporteral/AffiliateImporterAl.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Dnolbon\\Wordpress\\WpListTable' not found in wp-content/plugins/affiliateimporteral/src/Dnolbon/Aeidn/Tables/SheduleTable.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aeidn_get_update() in wp-content/plugins/affiliateimporteral/layout/backup_restore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Dnolbon\\Wordpress\\WordpressDb' not found in wp-content/plugins/affiliateimporteral/layout/status.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/affiliateimporteral/src/AEIDN/Utils/Ajax.php:11
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/affiliateimporteral/install.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/affiliateimporteral/src/AEIDN/Pages/DashboardPage.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

affiliateimporteral/AffiliateImporterAl.php 92% from 13 tests

The main file in "AffiliateImporterAI" v. 2.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("affiliateimporteral.php" instead of "AffiliateImporterAl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin16,131 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP521,4291,4257,050
CSS7885214,949
JavaScript6425682,830
SVG2001,301
JSON1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity23.46
▷ Minimum class complexity1.00
▷ Maximum class complexity178.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity97.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes37
▷ Abstract classes410.81%
▷ Concrete classes3389.19%
▷ Final classes00.00%
Methods306
▷ Static methods3210.46%
▷ Public methods25683.66%
▷ Protected methods3812.42%
▷ Private methods123.92%
Functions37
▷ Named functions3594.59%
▷ Anonymous functions25.41%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
19 PNG files occupy 0.83MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/toolbar/dashboard.png4.01KB2.34KB▼ 41.73%
(invalid) assets/img/main/views.png2.66KB0.00KB▼ 100.00%
(invalid) assets/img/main/items.png3.83KB0.00KB▼ 100.00%
assets/img/toolbar/schedule.png2.00KB1.93KB▼ 3.42%
assets/screenshots/Statistics.png267.52KB69.89KB▼ 73.87%