10% showcase-products

Code Review | Showcase Products

WordPress plugin Showcase Products scored10%from 54 tests.

About plugin

  • Plugin page: showcase-products
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2015
  • Latest release: Sep 25, 2015
  • Number of updates: 9
  • Update frequency: N/A
  • Top authors: Anupa Anand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,600 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
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/showcase-products/showcase-products.php+401
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.53ms] Passed 4 tests

Server-side resources used by Showcase Products
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.78 ▼40.70
Dashboard /wp-admin2.05 ▼1.265.92 ▼43.22
Posts /wp-admin/edit.php2.05 ▼1.316.15 ▼43.83
Add New Post /wp-admin/post-new.php2.05 ▼3.846.28 ▼94.37
Media Library /wp-admin/upload.php2.05 ▼1.186.02 ▼30.08
Add New /wp-admin/post-new.php?post_type=sp_products2.055.32
Products Categories /wp-admin/edit-tags.php?taxonomy=products_categories&post_type=sp_products2.057.35
Products /wp-admin/edit.php?post_type=sp_products2.056.81

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

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

Browser metrics Passed 4 tests

Showcase Products: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9314.76 ▲0.571.82 ▼0.0286.69 ▲42.80
Dashboard /wp-admin2,233 ▲425.82 ▲0.95101.61 ▼7.3182.89 ▲41.25
Posts /wp-admin/edit.php2,119 ▲331.98 ▲0.0037.02 ▼1.7332.69 ▼4.42
Add New Post /wp-admin/post-new.php1,540 ▲1217.48 ▼0.77760.96 ▲123.8754.74 ▼5.41
Media Library /wp-admin/upload.php1,418 ▲274.17 ▼0.0395.37 ▼2.9770.08 ▲28.41
Add New /wp-admin/post-new.php?post_type=sp_products2,6277.72188.10130.68
Products Categories /wp-admin/edit-tags.php?taxonomy=products_categories&post_type=sp_products1,2922.1426.8532.90
Products /wp-admin/edit.php?post_type=sp_products1,1341.9431.4731.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/showcase-products/showcase-products.php+401
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_sp_categories
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=sp_products
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/showcase-products/showcase-products.php+401
    Function create_function() is deprecated

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/showcase-products/showcase-products.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/showcase-products/templates/single.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/showcase-products/templates/archive.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #0 in showcase-products/assets to your readme.txt
  • Screenshots: Please add an image for screenshot #1 (Screenshot of front end display - screenshot-1.png)
The official readme.txt is a good inspiration

showcase-products/showcase-products.php Passed 13 tests

The principal PHP file in "Showcase Products" v. 1.0 is loaded by WordPress automatically on each request
22 characters long description:
Showcase your products

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
Success! There were no dangerous files found in this plugin2,517 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS3496462,069
PHP38078397
PO File1175951

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sp_icon1.png0.14KB0.16KB0.00%
(invalid) images/sp_icon.png32.21KB0.00KB▼ 100.00%
images/arrow.png0.17KB0.11KB▼ 35.84%
(invalid) images/sp_icon2.png32.21KB0.00KB▼ 100.00%