73% shopping-feed

Code Review | Upgrade Notice

WordPress plugin Upgrade Notice scored73%from 54 tests.

About plugin

  • Plugin page: shopping-feed
  • Plugin version: 6.3.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7+
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Sep 12, 2023
  • Number of updates: 262
  • Update frequency: every 6.0 days
  • Top authors: shoppingfeed (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /5,413 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▼2.52ms] Passed 4 tests

This is a short check of server-side resources used by Upgrade Notice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.4036.67 ▼4.25
Dashboard /wp-admin3.68 ▲0.3848.21 ▼1.61
Posts /wp-admin/edit.php3.73 ▲0.3852.58 ▲7.36
Add New Post /wp-admin/post-new.php6.20 ▲0.3295.52 ▼4.34
Media Library /wp-admin/upload.php3.54 ▲0.3237.28 ▲0.14

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

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

Browser metrics Passed 4 tests

Upgrade Notice: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.62 ▼1.031.87 ▲0.1942.95 ▼0.96
Dashboard /wp-admin2,215 ▲244.86 ▼1.02108.27 ▲9.7440.00 ▼1.25
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0539.84 ▲6.1734.91 ▼1.03
Add New Post /wp-admin/post-new.php1,520 ▼817.71 ▼5.44606.84 ▼71.3661.33 ▲6.20
Media Library /wp-admin/upload.php1,394 ▲34.20 ▼0.0999.42 ▲0.9242.39 ▲0.01

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/shopping-feed/src/ShoppingFeed.php+259
    rmdir(wp-content/uploads/shopping-feed): No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 177× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/shopping-feed/vendor/guzzlehttp/psr7/src/UploadedFile.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ShoppingFeed\\Feed\\Product\\AbstractProduct' not found in wp-content/plugins/shopping-feed/vendor/shoppingfeed/php-feed-generator/src/Product/ProductVariation.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/shopping-feed/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/shopping-feed/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/shopping-feed/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/shopping-feed/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/shopping-feed/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/shopping-feed/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/shopping-feed/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ShoppingFeed\\Sdk\\Resource\\AbstractDomainResource' not found in wp-content/plugins/shopping-feed/vendor/shoppingfeed/php-sdk/src/Api/Order/OrderDomain.php:13

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

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6 in shopping-feed/assets to your readme.txt
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

shopping-feed/shoppingfeed.php 92% from 13 tests

The principal PHP file in "Upgrade Notice" v. 6.3.0 is loaded by WordPress automatically on each request
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 ("shopping-feed.php" instead of "shoppingfeed.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin43,589 lines of code in 396 files:
LanguageFilesBlank linesComment linesLines of code
PHP3494,46110,67437,383
Markdown261,41504,184
JSON100924
Sass7387366
PO File1136175309
CSS2272260
JavaScript312863
SVG30053
Dockerfile212026
XML11012
YAML1109

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity8.63
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces56
Interfaces18
Traits3
Classes295
▷ Abstract classes72.37%
▷ Concrete classes28897.63%
▷ Final classes269.03%
Methods1,537
▷ Static methods25316.46%
▷ Public methods1,24080.68%
▷ Protected methods503.25%
▷ Private methods24716.07%
Functions223
▷ Named functions7433.18%
▷ Anonymous functions14966.82%
Constants211
▷ Global constants5023.70%
▷ Class constants16176.30%
▷ Public constants161100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.39MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-772x250.png66.29KB12.91KB▼ 80.53%
assets/images/ icon-256x256-.png38.25KB9.18KB▼ 75.99%
assets/images/banner-1544x500.png186.14KB25.67KB▼ 86.21%
assets/images/ icon-128x128.png15.62KB4.77KB▼ 69.43%
assets/images/icon-512x512.png88.41KB18.66KB▼ 78.90%