10% display-current-product-category

Code Review | Display Current Product Category

WordPress plugin Display Current Product Category scored 10% from 54 tests.

About plugin

  • Plugin page: display-current-p...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: May 27, 2022
  • Latest release: Jun 8, 2022
  • Number of updates: 4
  • Update frequency: every 3.3 days
  • Top authors: yekusiel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 344 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/display-current-product-category/display-current-product-category.php+87
    Uncaught Error: Call to undefined function wp_get_active_network_plugins() in wp-content/plugins/display-current-product-category/display-current-product-category.php:87
    Stack trace:
    #0 wp-admin/includes/plugin.php(2318): include_once()
    #1 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.94ms] Passed 4 tests

A check of server-side resources used by Display Current Product Category
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.56 ▲0.85
Dashboard /wp-admin3.31 ▲0.0050.22 ▲0.59
Posts /wp-admin/edit.php3.36 ▲0.0048.46 ▼3.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.47 ▼13.24
Media Library /wp-admin/upload.php3.23 ▲0.0031.56 ▼3.53

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Display Current Product Category: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.341.91 ▲0.2738.96 ▼0.49
Dashboard /wp-admin2,209 ▲204.84 ▼0.04109.20 ▼8.2241.56 ▼1.24
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0339.94 ▼1.6535.77 ▲1.38
Add New Post /wp-admin/post-new.php1,514 ▼017.50 ▲0.11602.10 ▲5.3948.26 ▼2.10
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.1797.94 ▼4.5341.65 ▲0.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/display-current-product-category/display-current-product-category.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
2 plugin tags: shortcode, woocommerce

display-current-product-category/display-current-product-category.php 69% from 13 tests

The main PHP file in "Display Current Product Category" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 233 characters long)
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.2" instead of "4.0")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin37 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2134137

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods266.67%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin