10% folksy-product-listing-widget-and-shortcode

Code Review | Folksy Product Listing Widget and Shortcode for Wordpress

WordPress plugin Folksy Product Listing Widget and Shortcode for Wordpress scored10%from 54 tests.

About plugin

  • Plugin page: folksy-product-li...
  • Plugin version: 1.1.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.2+
  • WordPress version: 6.3.1
  • First release: Nov 14, 2012
  • Latest release: Nov 27, 2012
  • Number of updates: 39
  • Update frequency: every 0.3 days
  • Top authors: wpsupprt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,854 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/folksy-product-listing-widget-and-shortcode/folksylisting.php+67
    Methods with the same name as their class will not be constructors in a future version of PHP; folksylistWidget has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼55.01ms] Passed 4 tests

A check of server-side resources used by Folksy Product Listing Widget and Shortcode for Wordpress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.37 ▼34.78
Dashboard /wp-admin2.16 ▼1.196.21 ▼54.84
Posts /wp-admin/edit.php2.16 ▼1.206.74 ▼39.60
Add New Post /wp-admin/post-new.php2.16 ▼3.737.40 ▼90.80
Media Library /wp-admin/upload.php2.16 ▼1.076.27 ▼27.62
Folksy Listing /wp-admin/options-general.php?page=folksylistitems-settings2.165.51

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_folksylistwidget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Folksy Product Listing Widget and Shortcode for Wordpress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.54 ▼0.661.61 ▼0.0738.54 ▼6.64
Dashboard /wp-admin2,209 ▲275.84 ▼0.0394.11 ▼4.7535.74 ▼6.17
Posts /wp-admin/edit.php2,098 ▲92.06 ▲0.0238.80 ▲1.0334.24 ▲0.31
Add New Post /wp-admin/post-new.php1,533 ▲523.37 ▲0.11636.93 ▼27.7440.18 ▼5.23
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.0593.21 ▼11.2040.48 ▼7.79
Folksy Listing /wp-admin/options-general.php?page=folksylistitems-settings8942.1523.8324.09

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
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/folksy-product-listing-widget-and-shortcode/folksylisting.php+67
    Methods with the same name as their class will not be constructors in a future version of PHP; folksylistWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_folksylistwidget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=folksylistitems-settings
    • > Deprecated in wp-content/plugins/folksy-product-listing-widget-and-shortcode/folksylisting.php+67
    Methods with the same name as their class will not be constructors in a future version of PHP; folksylistWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=folksylistitems-settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in folksylistWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=folksylistitems-settings
    • > Notice in wp-content/plugins/folksy-product-listing-widget-and-shortcode/folksylisting.php+239
    Undefined index: shopusername
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=folksylistitems-settings
    • > Notice in wp-content/plugins/folksy-product-listing-widget-and-shortcode/folksylisting.php+257
    Undefined index: button_color

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/folksy-product-listing-widget-and-shortcode/folksylisting.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were 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: Plugin contributors not specified
  • Screenshots: Please add images for these screenshots: #1 (Screenshot of the plugin in action on a website), #2 (Screenshot of the plugin settings), #3 (Screenshot of the shortcode in the page or post editor), #4 (Screenshot of the widget in a sidebar)
Please take inspiration from this readme.txt

folksy-product-listing-widget-and-shortcode/folksylisting.php 92% from 13 tests

The main PHP script in "Folksy Product Listing Widget and Shortcode for Wordpress" version 1.1.8.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("folksy-product-listing-widget-and-shortcode.php" instead of "folksylisting.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
There were no executable files found in this plugin1,642 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22573101,545
CSS14297

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity86.25
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity4.52
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods97
▷ Static methods11.03%
▷ Public methods8183.51%
▷ Protected methods1616.49%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants27100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.97MB with 0.53MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png42.61KB21.40KB▼ 49.77%
screenshot-2.png83.78KB38.00KB▼ 54.64%
screenshot-3.png33.95KB16.84KB▼ 50.39%
screenshot-1.png788.32KB295.82KB▼ 62.47%
assets/banner-donate.png44.13KB18.65KB▼ 57.74%