10% invelity-products-feeds

Code Review | Invelity Product Feeds

WordPress plugin Invelity Product Feeds scored10%from 54 tests.

About plugin

  • Plugin page: invelity-products...
  • Plugin version: 1.2.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 2, 2018
  • Latest release: Dec 4, 2020
  • Number of updates: 21
  • Update frequency: every 49.4 days
  • Top authors: invelity (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,327 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/invelity-products-feeds/taxonomy/brand-taxonomy.php+5
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.38MB] [CPU: ▼47.35ms] Passed 4 tests

An overview of server-side resources used by Invelity Product Feeds
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.60 ▼0.868.19 ▼27.41
Dashboard /wp-admin2.62 ▼0.6810.54 ▼41.81
Posts /wp-admin/edit.php2.62 ▼0.739.64 ▼37.57
Add New Post /wp-admin/post-new.php2.62 ▼3.2611.11 ▼82.60
Media Library /wp-admin/upload.php2.62 ▼0.6110.31 ▼23.78
Generate Feeds /wp-admin/admin.php?page=invelity-products-feeds2.6210.12
Invelity plugins /wp-admin/admin.php?page=invelity-plugins2.628.29
Manage Feeds /wp-admin/admin.php?page=invelity-products-manage-feeds2.6210.12

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
recovery_mode_email_last_sent
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Invelity Product Feeds
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.35 ▼0.001.71 ▼0.2644.43 ▲1.25
Dashboard /wp-admin2,224 ▲495.63 ▲0.0196.71 ▼3.3344.74 ▲1.86
Posts /wp-admin/edit.php2,129 ▲292.02 ▲0.0232.88 ▼2.8136.72 ▼0.46
Add New Post /wp-admin/post-new.php1,550 ▲2422.94 ▼0.71616.30 ▼70.1662.26 ▲11.54
Media Library /wp-admin/upload.php1,426 ▲234.23 ▲0.0199.03 ▼1.4942.97 ▼3.53
Generate Feeds /wp-admin/admin.php?page=invelity-products-feeds1,0591.126.4922.75
Invelity plugins /wp-admin/admin.php?page=invelity-plugins1,0811.9922.0657.34
Manage Feeds /wp-admin/admin.php?page=invelity-products-manage-feeds9822.9343.2977.12

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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/invelity-products-feeds/taxonomy/brand-taxonomy.php+5
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 7 options
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=invelity-products-manage-feeds
    • > Notice in wp-content/plugins/invelity-products-feeds/taxonomy/heureka-taxonomy.php+5
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=invelity-products-feeds
    • > Error in wp-content/plugins/invelity-products-feeds/classes/admin/classPluginSettingsGenerateFeedPage.php+344
    Uncaught Error: Class 'WC_Shipping_Zones' not found in wp-content/plugins/invelity-products-feeds/classes/admin/classPluginSettingsGenerateFeedPage.php:344
    Stack trace:
    #0 wp-content/plugins/invelity-products-feeds/classes/admin/classPluginSettingsGenerateFeedPage.php(66): PluginSettingsGenerateFeedPage->create_admin_page()
    #1 wp-content/plugins/invelity-products-feeds/classes/admin/classPluginSettingsGenerateFeedPage.php(9): PluginSettingsGenerateFeedPage->createGenerateFeedPage()
    #2 wp-content/plugins/invelity-products-feeds/classes/admin/classInvelityFeedPluginSettings.php(157): PluginSettingsGenerateFeedPage->__construct()
    #3 wp-includes/class-wp-hook.php(310): InvelityFeedPluginSettings->wp_feed_create_generate_feed()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(

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
Almost there! Just fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/invelity-products-feeds/taxonomy/brand-taxonomy.php:3
    • > PHP Notice
      Undefined variable: invelity_feed_options in wp-content/plugins/invelity-products-feeds/taxonomy/google-taxonomy.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/invelity-products-feeds/taxonomy/google-taxonomy.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/invelity-products-feeds/taxonomy/heureka-taxonomy.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/invelity-products-feeds/taxonomy/google-taxonomy.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invelity-products-feeds/classes/process/classAjaxFeedsProcess.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invelity-products-feeds/classes/process/classAjaxFeedsProcess.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/invelity-products-feeds/classes/process/classAjaxFeedsProcess.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=invelity-products-manage-feeds
    • > Network (severe)
    wp-content/plugins/invelity-products-feeds/assets/css/feed-admin.js?ver=1.0 - 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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
  • Screenshots: Add an image for screenshot #2 (Plugin usage)
Please take inspiration from this readme.txt

invelity-products-feeds/invelity-products-feeds.php 92% from 13 tests

The principal PHP file in "Invelity Product Feeds" v. 1.2.6 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 157 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin3,562 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP188661352,938
CSS28724480
JavaScript172209131
SVG30013

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 176)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity28.71
▷ Minimum class complexity1.00
▷ Maximum class complexity194.00
Average method complexity5.66
▷ Minimum method complexity1.00
▷ Maximum method complexity176.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods80
▷ Static methods11.25%
▷ Public methods5771.25%
▷ Protected methods11.25%
▷ Private methods2227.50%
Functions21
▷ Named functions1780.95%
▷ Anonymous functions419.05%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/dropdown.png0.28KB0.21KB▼ 24.31%
assets/screenshot-1.png185.67KB58.96KB▼ 68.24%
assets/screenshot-2.png3.42KB2.35KB▼ 31.15%