10% taxonomy-thumbnail-widget

Code Review | Taxonomy Thumbnail and Widget

WordPress plugin Taxonomy Thumbnail and Widget scored10%from 54 tests.

About plugin

  • Plugin page: taxonomy-thumbnai...
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.0-5.8.0
  • WordPress version: 6.3.1
  • First release: Sep 15, 2016
  • Latest release: May 23, 2022
  • Number of updates: 34
  • Update frequency: every 61.1 days
  • Top authors: sunilkumarthz (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /3,398 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/taxonomy-thumbnail-widget/lib/taxonomy_widget.php+2
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼48.18ms] Passed 4 tests

This is a short check of server-side resources used by Taxonomy Thumbnail and Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.17 ▼32.80
Dashboard /wp-admin2.17 ▼1.146.40 ▼39.30
Posts /wp-admin/edit.php2.17 ▼1.195.86 ▼38.28
Add New Post /wp-admin/post-new.php2.17 ▼3.726.87 ▼82.33
Media Library /wp-admin/upload.php2.17 ▼1.076.66 ▼27.41
TTW Information /wp-admin/admin.php?page=ttw_info2.176.98
TTW Settings /wp-admin/admin.php?page=ttw_manager2.177.83

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_taxonomytermlist
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Taxonomy Thumbnail and Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,962 ▲20114.75 ▲0.391.55 ▼0.1440.85 ▼2.13
Dashboard /wp-admin2,354 ▲1746.19 ▲0.52102.50 ▲11.1982.35 ▲41.79
Posts /wp-admin/edit.php2,297 ▲1943.36 ▲1.3947.11 ▲4.6969.55 ▲31.37
Add New Post /wp-admin/post-new.php1,560 ▲3423.06 ▼0.45615.76 ▼86.8133.71 ▼18.28
Media Library /wp-admin/upload.php1,434 ▲344.18 ▼0.0481.30 ▼12.0579.22 ▲36.14
TTW Information /wp-admin/admin.php?page=ttw_info1,1903.1338.9765.57
TTW Settings /wp-admin/admin.php?page=ttw_manager1,0803.2044.6154.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/taxonomy-thumbnail-widget/lib/taxonomy_widget.php+2
    Function create_function() is deprecated
  • The plugin did not uninstall correctly, leaving 19 files (0.33MB) in the plugin directory
    • (new file) img/multiple-select.png
    • (new file) css/taxonomymanager_admin.css
    • (new file) img/tax-setting.png
    • (new file) js/taxonomymanager.js
    • (new file) css/multiple-select.css
    • (new file) js/multiple-select.js
    • (new file) img/placeholder.png
    • (new file) img/ttwsetting.png
    • (new file) lib/taxonomy_widget.php
    • (new file) css/taxonomymanager.css
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_taxonomytermlist
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ttw_manager
    • > Deprecated in wp-content/plugins/taxonomy-thumbnail-widget/lib/taxonomy_widget.php+2
    Function create_function() is deprecated

SRP 0% 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
Please take a closer look at the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/taxonomy-thumbnail-widget/taxonomy-thumbnail-widget.php
    • > /wp-content/plugins/taxonomy-thumbnail-widget/lib/ttw_globaluse.php
    • > /wp-content/plugins/taxonomy-thumbnail-widget/uninstall.php
    • > /wp-content/plugins/taxonomy-thumbnail-widget/lib/taxonomymanager.php
    • > /wp-content/plugins/taxonomy-thumbnail-widget/lib/ttw_shortcode.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_post() in wp-content/plugins/taxonomy-thumbnail-widget/lib/ttw_information.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/taxonomy-thumbnail-widget/lib/taxonomy_widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Donate link: Invalid url: "#"
The official readme.txt might help

taxonomy-thumbnail-widget/taxonomy-thumbnail-widget.php 92% from 13 tests

The main PHP file in "Taxonomy Thumbnail and Widget" ver. 1.5.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,879 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript29926741
PHP775127735
CSS3656403

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity17.50
▷ Minimum class complexity13.00
▷ Maximum class complexity25.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.24MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png156.24KB58.30KB▼ 62.68%
img/multiple-select.png3.30KB0.62KB▼ 81.18%
img/ttwsetting.png0.65KB0.71KB0.00%
img/placeholder.png22.43KB17.70KB▼ 21.10%
screenshot-1.png62.64KB32.47KB▼ 48.17%