10% wp-custom-taxonomy-image

Code Review | Category and Taxonomy Image

WordPress plugin Category and Taxonomy Image scored 10% from 54 tests.

About plugin

  • Plugin page: wp-custom-taxonom...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-5.6
  • WordPress version: 5.8.1
  • First release: Jul 26, 2015
  • Latest release: Jan 26, 2021
  • Number of updates: 34
  • Update frequency: every 59.2 days
  • Top authors: amu02aftab (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

7,000+ active / 43,212 total downloads

Benchmarks

Plugin footprint 58% 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
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-custom-taxonomy-image/wp-custom-taxonomy-image.php+15
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.85MB] [CPU: ▼196.03ms] Passed 4 tests

Server-side resources used by Category and Taxonomy Image
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼1.056.19 ▼32.56
Dashboard /wp-admin1.80 ▼1.266.46 ▼53.44
Posts /wp-admin/edit.php1.80 ▼1.316.05 ▼42.90
Add New Post /wp-admin/post-new.php1.80 ▼3.636.79 ▼649.34
Media Library /wp-admin/upload.php1.80 ▼1.215.82 ▼38.45
Taxonomy Image /wp-admin/options-general.php?page=aft-options1.8010.21

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Category and Taxonomy Image
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13616.28 ▲0.7114.57 ▲0.4155.09 ▲1.90
Dashboard /wp-admin2,969 ▲355.98 ▲0.03201.96 ▲41.31117.07 ▲0.34
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0275.11 ▲3.9498.48 ▲5.21
Add New Post /wp-admin/post-new.php1,584 ▼3120.25 ▼1.05443.11 ▲99.71116.78 ▲1.55
Media Library /wp-admin/upload.php1,812 ▲55.06 ▲0.03180.66 ▲10.00118.57 ▼10.30
Taxonomy Image /wp-admin/options-general.php?page=aft-options1,0582.0558.8281.73

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
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/wp-custom-taxonomy-image/wp-custom-taxonomy-image.php+15
    Trying to access array offset on value of type bool

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=aft-options
    • > Notice in wp-content/plugins/wp-custom-taxonomy-image/wp-custom-taxonomy-image.php+15
    Trying to access array offset on value of type bool

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-custom-taxonomy-image/wp-custom-taxonomy-image.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Settings page where you can select the taxonomies you want to include it in WP Custom Taxonomy Image), #2 (Example of the category/taxonomy image under the general category)
  • Tags: There are too many tags (20 tag instead of maximum 10)
You can look at the official readme.txt

wp-custom-taxonomy-image/wp-custom-taxonomy-image.php Passed 13 tests

This is the main PHP file of "Category and Taxonomy Image" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
81 characters long description:
Category and Taxonomy Image Plugin allow you to add image with category/taxonomy.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin379 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14220271
PHP12620108

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png13.98KB7.69KB▼ 45.01%
screenshot-2.png55.75KB25.09KB▼ 54.99%