94% custom-category-image

Code Review | Custom Category Image

WordPress plugin Custom Category Image scored 94% from 54 tests.

About plugin

  • Plugin page: custom-category-i...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.8.0
  • WordPress version: 5.8.1
  • First release: Jul 25, 2017
  • Latest release: Aug 2, 2021
  • Number of updates: 7
  • Update frequency: every 210.1 days
  • Top authors: mingocommerce (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active / 1,572 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼168.37ms] Passed 4 tests

An overview of server-side resources used by Custom Category Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2039.59 ▲16.08
Dashboard /wp-admin3.16 ▲0.1054.80 ▲5.60
Posts /wp-admin/edit.php3.28 ▲0.1757.55 ▲8.52
Add New Post /wp-admin/post-new.php5.51 ▲0.0798.84 ▼676.36
Media Library /wp-admin/upload.php3.08 ▲0.0835.76 ▼11.25

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Custom Category Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,895 ▲29917.53 ▲1.8812.25 ▼0.0849.82 ▼0.52
Dashboard /wp-admin3,160 ▲2267.95 ▲1.83175.84 ▲26.06121.96 ▲7.72
Posts /wp-admin/edit.php2,961 ▲2224.24 ▲1.5299.51 ▲27.8197.81 ▲3.35
Add New Post /wp-admin/post-new.php1,615 ▼6821.11 ▲2.54272.45 ▼143.19111.98 ▼0.16
Media Library /wp-admin/upload.php1,807 ▼04.75 ▼0.24135.68 ▼27.91127.90 ▼9.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-category-image/custom-category-image.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: custom category image, taxonomy image, category image

custom-category-image/custom-category-image.php 85% from 13 tests

The principal PHP file in "Custom Category Image" v. 1.2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to a folder that does not exist ("/i18n/")

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
No dangerous file extensions were detected107 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12114107

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin