78% awin-data-feed

Code Review | Awin Data Feed

WordPress plugin Awin Data Feed scored78%from 54 tests.

About plugin

  • Plugin page: awin-data-feed
  • Plugin version: 1.8.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2016
  • Latest release: Apr 27, 2023
  • Number of updates: 46
  • Update frequency: every 56.0 days
  • Top authors: digitalwindow (63.04%)awinglobal (39.13%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /11,729 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
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.46ms] Passed 4 tests

Server-side resources used by Awin Data Feed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2339.46 ▲0.90
Dashboard /wp-admin3.35 ▲0.0448.12 ▼5.09
Posts /wp-admin/edit.php3.46 ▲0.1047.35 ▲4.46
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.81 ▲3.56
Media Library /wp-admin/upload.php3.27 ▲0.0435.69 ▲2.48
Datafeed Guide /wp-admin/admin.php?page=data-feed-guide3.2333.67
Settings /wp-admin/admin.php?page=datafeed-settings3.2335.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: 2 new tables, 7 new options
New tables
wp_datafeed_analytics
wp_datafeed
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Awin Data Feed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15113.81 ▼0.538.40 ▲6.7340.10 ▼4.04
Dashboard /wp-admin2,232 ▲555.52 ▼0.0897.17 ▼9.5385.85 ▲43.25
Posts /wp-admin/edit.php2,141 ▲411.99 ▲0.0334.36 ▼4.1033.68 ▼2.81
Add New Post /wp-admin/post-new.php1,562 ▲3423.08 ▼0.45766.32 ▲91.8365.38 ▲12.52
Media Library /wp-admin/upload.php1,440 ▲374.19 ▲0.0094.77 ▼4.5470.08 ▲24.64
Datafeed Guide /wp-admin/admin.php?page=data-feed-guide8681.9923.3829.05
Settings /wp-admin/admin.php?page=datafeed-settings8512.1722.9431.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_widget
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 4
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/awin-data-feed/src/Datafeed/Models/DBAdapter.php on line 7
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/awin-data-feed/src/Datafeed/Widget.php:5
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 7
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 11
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 11
    • > PHP Notice
      Undefined variable: layout in wp-content/plugins/awin-data-feed/src/Datafeed/Views/Widget/widget.php on line 3

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 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: affilinet, awin data feed, shopwindow, zanox, awin...

awin-data-feed/AWDatafeed.php 85% from 13 tests

The entry point to "Awin Data Feed" version 1.8.5 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("awin-data-feed.php" instead of "AWDatafeed.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,278 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP162513221,348
Markdown1580281
PO File29698234
CSS1224220
JavaScript1130114
HTML11049
YAML10132

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity8.31
▷ Minimum class complexity2.00
▷ Maximum class complexity22.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes13
▷ Abstract classes17.69%
▷ Concrete classes1292.31%
▷ Final classes00.00%
Methods82
▷ Static methods00.00%
▷ Public methods6781.71%
▷ Protected methods00.00%
▷ Private methods1518.29%
Functions13
▷ Named functions215.38%
▷ Anonymous functions1184.62%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png1.78KB0.90KB▼ 49.29%