90% display-category-image

Code Review | Display Category Image For WooCommerce

WordPress plugin Display Category Image For WooCommerce scored90%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: 6.3.1
  • 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 /1,338 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

Analyzing server-side resources used by Display Category Image For WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.74 ▼6.73
Dashboard /wp-admin3.31 ▲0.0145.45 ▼7.20
Posts /wp-admin/edit.php3.36 ▲0.0051.50 ▲2.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.79 ▲2.37
Media Library /wp-admin/upload.php3.24 ▲0.0035.01 ▲0.79

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Display Category Image For WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.66 ▼1.021.67 ▼0.3043.00 ▼6.67
Dashboard /wp-admin2,200 ▲95.88 ▲0.99109.04 ▲3.8642.34 ▼2.84
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0341.04 ▼0.5535.97 ▼1.50
Add New Post /wp-admin/post-new.php1,533 ▼1023.27 ▲5.00599.10 ▲2.6058.11 ▲6.25
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0595.33 ▲0.0842.89 ▲2.17

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-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: image, woocommerce, header, achieves, category

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

The principal PHP file in "Display Category Image For WooCommerce" v. 1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • 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 | Executable files are not allowed as they can serve as attack vectors
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

This is a very shot review 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.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 images were found in this plugin