10% templatic-categoryicons

Code Review | Easy Category Icons

WordPress plugin Easy Category Icons scored10%from 54 tests.

About plugin

  • Plugin page: templatic-categor...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.0
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Oct 27, 2018
  • Number of updates: 29
  • Update frequency: every 30.3 days
  • Top authors: rbhavesh (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /18,379 total downloads

Benchmarks

Plugin footprint 40% 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
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/templatic-categoryicons/templatic_category_icons.php+53
    Undefined index: taxonomy

Server metrics [RAM: ▼1.97MB] [CPU: ▼59.18ms] Passed 4 tests

Analyzing server-side resources used by Easy Category Icons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.83 ▼37.82
Dashboard /wp-admin2.05 ▼1.306.03 ▼59.67
Posts /wp-admin/edit.php2.05 ▼1.315.91 ▼44.37
Add New Post /wp-admin/post-new.php2.05 ▼3.845.89 ▼94.85
Media Library /wp-admin/upload.php2.05 ▼1.186.52 ▼27.67

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Category Icons
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,027 ▲28115.12 ▲0.754.75 ▲2.6542.39 ▲2.04
Dashboard /wp-admin2,353 ▲1626.64 ▲0.83132.45 ▲22.2050.39 ▲6.81
Posts /wp-admin/edit.php2,273 ▲1843.52 ▲1.4060.87 ▲26.0038.59 ▼0.59
Add New Post /wp-admin/post-new.php1,523 ▼523.26 ▼0.06675.63 ▼20.2637.39 ▼15.37
Media Library /wp-admin/upload.php1,400 ▲154.26 ▲0.0393.51 ▼11.1545.39 ▼1.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/templatic-categoryicons/templatic_category_icons.php+53
    Undefined index: taxonomy
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/templatic-categoryicons/templatic_category_icons.php:12

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)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #4 (This is for what this might look like in your category page)
Please take inspiration from this readme.txt

templatic-categoryicons/templatic_category_icons.php 92% from 13 tests

This is the main PHP file of "Easy Category Icons" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("templatic-categoryicons.php" instead of "templatic_category_icons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected458 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18345333
JavaScript129483
PO File1111142

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.43MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.63KB14.03KB▼ 10.23%
screenshot-4.png217.61KB217.36KB0.12%
screenshot-3.png30.53KB29.22KB▼ 4.27%
screenshot-2.png171.73KB60.04KB▼ 65.04%