64% products-feed-generator

Code Review | Products Feed Generator

WordPress plugin Products Feed Generator scored64%from 54 tests.

About plugin

  • Plugin page: products-feed-gen...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Feb 26, 2022
  • Latest release: Jun 23, 2023
  • Number of updates: 19
  • Update frequency: every 25.4 days
  • Top authors: mcarter76 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /866 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.89ms] Passed 4 tests

Analyzing server-side resources used by Products Feed Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.29 ▼0.63
Dashboard /wp-admin3.33 ▼0.0149.17 ▼14.26
Posts /wp-admin/edit.php3.38 ▲0.0346.24 ▲0.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.47 ▼8.25
Media Library /wp-admin/upload.php3.25 ▲0.0336.66 ▼0.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Products Feed Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.26 ▼0.141.77 ▼0.2743.92 ▼0.25
Dashboard /wp-admin2,197 ▲235.56 ▼0.1181.96 ▼17.5835.60 ▼6.26
Posts /wp-admin/edit.php2,099 ▲21.98 ▼0.0533.35 ▼2.5335.27 ▲0.51
Add New Post /wp-admin/post-new.php1,528 ▲223.61 ▲0.46657.59 ▼28.5963.67 ▲0.82
Media Library /wp-admin/upload.php1,402 ▲24.24 ▲0.1195.13 ▼8.5942.90 ▼6.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Error in wp-content/plugins/products-feed-generator/includes/class-products-feed-generator-deactivator.php+56
    Uncaught Error: Class 'WC_Shipping' not found in wp-content/plugins/products-feed-generator/includes/class-products-feed-generator-deactivator.php:56
    Stack trace:
    #0 wp-content/plugins/products-feed-generator/products-feed-generator.php(55): Products_Feed_Generator_Deactivator::deactivate()
    #1 wp-includes/class-wp-hook.php(310): deactivate_products_feed_generator()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/includes/plugin.php(816): do_action()
  • This plugin has failed uninstalling correctly, leaving 26 files (0.11MB) in the plugin directory
    • (new file) README.txt
    • (new file) admin/index.php
    • (new file) includes/class-products-feed-generator-activator.php
    • (new file) admin/images/spinner-3.gif
    • (new file) LICENSE.txt
    • (new file) admin/class-products-feed-generator-admin.php
    • (new file) admin/partials/products-feed-generator-admin-display.php
    • (new file) admin/css/products-feed-generator-admin.css
    • (new file) admin/js/products-feed-generator-admin.js
    • (new file) admin/css/woocommerce-styles.css
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/products-feed-generator/admin/partials/products-feed-generator-admin-display.php
    • > /wp-content/plugins/products-feed-generator/public/partials/products-feed-generator-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === products-feed-generator === )
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

products-feed-generator/products-feed-generator.php Passed 13 tests

This is the main PHP file of "Products Feed Generator" version 1.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
76 characters long description:
Generates an XML Products Feed for Google Merchant Center in RSS 2.0 format.

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 plugin1,138 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP14344758844
JavaScript26570150
CSS3348144

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.78
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3581.40%
▷ Protected methods36.98%
▷ Private methods511.63%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin