10% alfieliate-datafeed-installer

Code Review | Alfieliate Wordpress plugin

WordPress plugin Alfieliate Wordpress plugin scored10%from 54 tests.

About plugin

  • Plugin page: alfieliate-datafe...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.2.1
  • WordPress version: 6.3.1
  • First release: Jun 6, 2014
  • Latest release: Jun 6, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ermst4r (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,137 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/alfieliate-datafeed-installer/alfie-feed.php+140
    Trying to access array offset on value of type null

Server metrics [RAM: ▼1.90MB] [CPU: ▼63.32ms] Passed 4 tests

This is a short check of server-side resources used by Alfieliate Wordpress plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.87 ▼46.41
Dashboard /wp-admin2.11 ▼1.196.01 ▼43.94
Posts /wp-admin/edit.php2.11 ▼1.246.09 ▼37.14
Add New Post /wp-admin/post-new.php2.11 ▼3.785.60 ▼125.78
Media Library /wp-admin/upload.php2.11 ▼1.125.19 ▼28.71
Alfieliate Matching /wp-admin/admin.php?page=manage-matching2.116.07
Configuration /wp-admin/admin.php?page=alfie-config2.116.76
Alfieliate install filters /wp-admin/admin.php?page=alfie-feed-plugin2.117.07

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 431 new files
Database: 2 new tables, 6 new options
New tables
wp_alfieliate_settings
wp_alfieliate_products
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Alfieliate Wordpress plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲25213.55 ▼0.825.50 ▲3.5444.27 ▲0.66
Dashboard /wp-admin2,263 ▲755.81 ▼0.0099.58 ▼18.1639.87 ▼3.78
Posts /wp-admin/edit.php2,146 ▲572.02 ▼0.0138.30 ▲2.6433.29 ▼4.74
Add New Post /wp-admin/post-new.php1,564 ▲2923.67 ▲0.52669.11 ▼1.6053.45 ▼8.41
Media Library /wp-admin/upload.php1,445 ▲574.17 ▼0.04107.72 ▲10.2945.97 ▲4.13
Alfieliate Matching /wp-admin/admin.php?page=manage-matching8812.0221.8324.63
Configuration /wp-admin/admin.php?page=alfie-config8842.0223.8629.73
Alfieliate install filters /wp-admin/admin.php?page=alfie-feed-plugin8812.0223.5423.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_localize_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-ajax-request handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie tables were found after uninstall: 1 table
    • wp_alfieliate_settings
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_localize_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-ajax-request handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Warning in wp-content/plugins/alfieliate-datafeed-installer/include/puck.php+22
    file_get_contents(http://alfieliate.nl/whitelabel/api/getacceptedfiltersfromwebsite/apikey/APIKEY/id/1): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

    • > GET request to /wp-admin/admin.php?page=manage-matching
    • > Warning in wp-content/plugins/alfieliate-datafeed-installer/include/puck.php+37
    file_get_contents(http://alfieliate.nl/whitelabel/api/getmatchings/apikey/APIKEY): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden

  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Warning in wp-content/plugins/alfieliate-datafeed-installer/include/install_filter.php+45
    Invalid argument supplied for foreach()
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Notice in wp-content/plugins/alfieliate-datafeed-installer/include/alfie-config.php+47
    Undefined index: oscimp_hidden
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Notice in wp-content/plugins/alfieliate-datafeed-installer/include/install_filter.php+151
    Undefined variable: code

SRP 0% 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
Please fix the following
  • 17× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/dom_data_th.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/dom_data.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/js_data_mixed_types.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/html_table.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/6776.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/-complex_header.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/include/filterscript.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/dom_data_two_headers.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/dymanic_table.php
    • > /wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/2512.php
  • 38× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined index: scripts in wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/-complex_header.php on line 22
    • > PHP Notice
      Undefined variable: website_id in wp-content/plugins/alfieliate-datafeed-installer/include/filterscript.php on line 129
    • > PHP Notice
      Undefined variable: website_id in wp-content/plugins/alfieliate-datafeed-installer/include/filterscript.php on line 99
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/alfieliate-datafeed-installer/include/filterscript.php on line 129
    • > PHP Warning
      include(): Failed opening 'datatables/mysql.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/performance/large.php on line 3
    • > PHP Notice
      Undefined index: manage in wp-content/plugins/alfieliate-datafeed-installer/include/manage.php on line 1
    • > PHP Notice
      Undefined variable: puck in wp-content/plugins/alfieliate-datafeed-installer/include/overview.php on line 14
    • > PHP Notice
      Undefined variable: s_id in wp-content/plugins/alfieliate-datafeed-installer/include/filterscript.php on line 55
    • > PHP Notice
      Undefined index: scripts in wp-content/plugins/alfieliate-datafeed-installer/media/unit_testing/templates/dymanic_table.php on line 27
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/alfieliate-datafeed-installer/include/manage.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/css/jslider.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/css/jslider.blue.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/css/jslider.plastic.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/css/jslider.round.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/css/jslider.round.plastic.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/css/style.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/js/jshashtable-2.1_src.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/js/jquery.numberformatter-1.2.3.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/js/tmpl.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/js/jquery.dependClass-0.1.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/js/draggable-0.1.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/js/jquery.slider.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=alfie-feed-plugin
    • > Network (severe)
    wp-content/plugins/alfieliate/media/js/jquery.dataTables.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === alfieliate-datafeed-installer === )
You can take inspiration from this readme.txt

alfieliate-datafeed-installer/alfie-feed.php 92% from 13 tests

This is the main PHP file of "Alfieliate Wordpress plugin" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("alfieliate-datafeed-installer.php" instead of "alfie-feed.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 plugin58,836 lines of code in 404 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3599,29014,93451,149
PHP29343605,017
HTML41801,425
CSS123822141,245

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
20 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/jslider.plastic.png1.39KB0.85KB▼ 39.14%
media/images/forward_enabled.png1.35KB0.58KB▼ 56.96%
media/images/sort_both.png1.11KB0.29KB▼ 74.12%
media/images/sort_desc_disabled.png1.02KB0.25KB▼ 75.98%
img/jslider.round.plastic.png1.91KB1.20KB▼ 37.22%