100% display-category-image

Code Review | Display Category Image For WooCommerce

WordPress plugin Display Category Image For WooCommerce scored 100% from 54 tests.

About plugin

  • Plugin page: display-category-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.4.2
  • WordPress version: 5.9.2
  • First release: Jun 30, 2020
  • Latest release: Jul 1, 2020
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: rajdipsinharoy (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 919 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.02MB] [CPU: ▼300.83ms] Passed 4 tests

Analyzing server-side resources used by Display Category Image For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.80 ▼6.09
Dashboard /wp-admin3.41 ▲0.0032.56 ▼6.97
Posts /wp-admin/edit.php3.64 ▲0.0040.79 ▲0.58
Add New Post /wp-admin/post-new.php6.88 ▼0.0992.64 ▼1,189.45
Media Library /wp-admin/upload.php3.30 ▲0.0024.10 ▼0.81

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Display Category Image For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲4216.11 ▲0.836.11 ▼2.651.99 ▼0.29
Dashboard /wp-admin2,895 ▲456.16 ▲0.04119.29 ▼12.52156.21 ▼51.50
Posts /wp-admin/edit.php2,691 ▲13.24 ▼0.0062.58 ▼3.72142.10 ▼56.98
Add New Post /wp-admin/post-new.php1,668 ▼4319.20 ▼2.08382.85 ▼73.13155.34 ▼39.48
Media Library /wp-admin/upload.php1,698 ▲65.45 ▼0.01145.20 ▲3.57184.16 ▼44.39

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: image, woocommerce, category, achieves, header

display-category-image/display-category-image.php 92% from 13 tests

The main PHP file in "Display Category Image For WooCommerce" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin16 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161716

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected