78% show-products-by-categories

Code Review | Show products by categories

WordPress plugin Show products by categories scored78%from 54 tests.

About plugin

  • Plugin page: show-products-by-...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-1.0
  • WordPress version: 6.3.1
  • First release: Jan 27, 2016
  • Latest release: Jan 27, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: alexeydudka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.52ms] Passed 4 tests

Analyzing server-side resources used by Show products by categories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.59 ▼5.46
Dashboard /wp-admin3.34 ▲0.0444.98 ▼6.57
Posts /wp-admin/edit.php3.39 ▲0.0344.23 ▼4.74
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.95 ▼9.29
Media Library /wp-admin/upload.php3.27 ▲0.0332.06 ▼1.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Show products by categories
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.70 ▼0.991.66 ▼0.2539.38 ▼3.02
Dashboard /wp-admin2,208 ▲345.85 ▲0.95100.81 ▼2.5737.75 ▼1.47
Posts /wp-admin/edit.php2,091 ▲22.05 ▲0.0738.61 ▼2.3135.65 ▼1.20
Add New Post /wp-admin/post-new.php6,459 ▲4,93123.25 ▲4.98867.26 ▲267.3091.03 ▲33.79
Media Library /wp-admin/upload.php1,393 ▲84.22 ▲0.0096.81 ▼7.1942.40 ▼2.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_show_by_categories_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/show-products-by-categories/show-by-categories-admin.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/show-products-by-categories/show-by-categories-functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/show-products-by-categories/show-by-categories.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed: You can look at the official readme.txt

show-products-by-categories/show-by-categories.php 85% from 13 tests

This is the main PHP file of "Show products by categories" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("show-products-by-categories.php" instead of "show-by-categories.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 527 characters long)

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
Everything looks great! No dangerous files found in this plugin252 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP31010171
CSS10081

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin