78% wp-categories-widget

Code Review | WP Categories Widget

WordPress plugin WP Categories Widget scored78%from 54 tests.

About plugin

  • Plugin page: wp-categories-widget
  • Plugin version: 2.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Aug 18, 2023
  • Number of updates: 50
  • Update frequency: every 50.5 days
  • Top authors: india-web-developer (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

8,000+ active /75,706 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.35ms] Passed 4 tests

Server-side resources used by WP Categories Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.63 ▼4.50
Dashboard /wp-admin3.40 ▲0.1047.05 ▼5.62
Posts /wp-admin/edit.php3.45 ▲0.0948.77 ▼3.35
Add New Post /wp-admin/post-new.php5.98 ▲0.0996.29 ▼3.91
Media Library /wp-admin/upload.php3.33 ▲0.0939.74 ▲6.28
WP Category Widget /wp-admin/options-general.php?page=wcw-page3.3032.99

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_wpcategorieswidget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP Categories Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.40 ▲0.041.72 ▼0.2241.88 ▲0.04
Dashboard /wp-admin2,213 ▲254.86 ▼1.00109.07 ▼3.4743.74 ▲4.55
Posts /wp-admin/edit.php2,096 ▲71.99 ▼0.0441.23 ▲4.5137.06 ▼0.20
Add New Post /wp-admin/post-new.php1,536 ▲2223.11 ▲5.61667.27 ▲42.3154.11 ▲4.45
Media Library /wp-admin/upload.php1,389 ▼24.32 ▲0.13100.86 ▼0.0346.90 ▲3.61
WP Category Widget /wp-admin/options-general.php?page=wcw-page9422.1026.1334.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wpcategorieswidget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-categories-widget/lib/settings.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=wcw-page
    • > Javascript (severe) in unknown
    /wp-content/plugins/wp-categories-widget/assets/wcw-admin.js?ver=6.3.1 11:2 Uncaught TypeError: jQuery(...).ready(...) is not a function

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: posts widget, custom widget, product categories widget, taxonomy widget, category widget

wp-categories-widget/wp-categories-widget.php 92% from 13 tests

"WP Categories Widget" version 2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 161 characters long)

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
There were no executable files found in this plugin368 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP386103356
JavaScript10111
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity31.50
▷ Minimum class complexity3.00
▷ Maximum class complexity60.00
Average method complexity5.36
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin