78% woo-product-showcase

Code Review | Woo Product Showcase

WordPress plugin Woo Product Showcase scored78%from 54 tests.

About plugin

  • Plugin page: woo-product-showcase
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Jun 1, 2018
  • Latest release: Sep 16, 2020
  • Number of updates: 19
  • Update frequency: every 44.1 days
  • Top authors: afthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /20,956 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Woo Product Showcase
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.82 ▼4.94
Dashboard /wp-admin3.32 ▲0.0152.97 ▼1.02
Posts /wp-admin/edit.php3.37 ▲0.0149.19 ▼0.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.20 ▼9.90
Media Library /wp-admin/upload.php3.24 ▲0.0140.35 ▲5.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Woo Product Showcase
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4214.54 ▲0.182.15 ▲0.3943.09 ▼3.77
Dashboard /wp-admin2,209 ▲325.51 ▼0.1598.70 ▲3.6347.05 ▲3.44
Posts /wp-admin/edit.php2,114 ▲112.01 ▼0.0235.66 ▼10.0934.84 ▼6.99
Add New Post /wp-admin/post-new.php1,535 ▲921.01 ▼2.46712.07 ▲67.8551.53 ▼4.50
Media Library /wp-admin/upload.php1,411 ▲114.20 ▲0.01100.87 ▲0.6245.70 ▲4.34

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/woo-product-showcase/aft-woo-product-showcase.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AFTWPL_Widget_Base' not found in wp-content/plugins/woo-product-showcase/includes/widgets/widget-product-grid.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/woo-product-showcase/includes/blocks/block-product-grid.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'AFTWPL_Widget_Base' not found in wp-content/plugins/woo-product-showcase/includes/widgets/widget-product-list.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'AFTWPL_Widget_Base' not found in wp-content/plugins/woo-product-showcase/includes/widgets/widget-product-express-grid.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-showcase/includes/aftwpl-common-functions.php:148
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woo-product-showcase/includes/widgets/widgets-base.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/woo-product-showcase/includes/blocks/block-product-express-grid.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-product-showcase/includes/widgets/widgets-common-functions.php:122
    • > PHP Warning
      Use of undefined constant AFTWPL_BASE_DIR - assumed 'AFTWPL_BASE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/woo-product-showcase/includes/widgets/widgets-init.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'AFTWPL_BASE_DIR/includes/widgets/widgets-base.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-product-showcase/includes/widgets/widgets-init.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: widgets, product, shortcodes, woocommerce, woocommerce product grid...

woo-product-showcase/aft-woo-product-showcase.php 85% from 13 tests

"Woo Product Showcase" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-product-showcase.php" instead of "aft-woo-product-showcase.php")
  • Description: The description should be shorter than 140 characters (currently 290 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin10,257 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS329216,894
JavaScript46542941,822
PHP173913831,253
SVG100288

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity14.57
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods12.63%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin