10% pro-categories-widget

Code Review | Pro Categories Widget

WordPress plugin Pro Categories Widget scored10%from 54 tests.

About plugin

  • Plugin page: pro-categories-wi...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.1.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2013
  • Latest release: Mar 26, 2019
  • Number of updates: 18
  • Update frequency: every 108.7 days
  • Top authors: shambhu patnaik (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /21,402 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/pro-categories-widget/pro-categories-widget.php+118
    Function create_function() is deprecated

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

A check of server-side resources used by Pro Categories Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.52 ▼37.88
Dashboard /wp-admin2.05 ▼1.306.56 ▼59.29
Posts /wp-admin/edit.php2.05 ▼1.315.78 ▼44.58
Add New Post /wp-admin/post-new.php2.05 ▼3.844.66 ▼104.41
Media Library /wp-admin/upload.php2.05 ▼1.184.66 ▼31.83

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_pro_categories_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Pro Categories Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.39 ▲0.111.82 ▲0.0943.24 ▲1.42
Dashboard /wp-admin2,198 ▲185.63 ▼0.0792.91 ▲4.1142.02 ▼0.36
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0535.82 ▼8.9537.85 ▼0.95
Add New Post /wp-admin/post-new.php1,535 ▲918.30 ▼4.92590.10 ▼90.5372.67 ▲12.69
Media Library /wp-admin/upload.php1,403 ▲34.24 ▲0.0498.96 ▼5.4044.16 ▼2.14

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/pro-categories-widget/pro-categories-widget.php+118
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_pro_categories_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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 0% 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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pro-categories-widget/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pro-categories-widget/pro-categories-widget.php:10

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: exclude category, pro categories widget, exclude categories, advanced categories widget, category...

pro-categories-widget/pro-categories-widget.php Passed 13 tests

The entry point to "Pro Categories Widget" version 1.3 is a PHP file that has certain tags in its header comment area
76 characters long description:
Pro Categories Widget plugin.You have choice to specific categories exclude.

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
Good job! No executable or dangerous file extensions detected93 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2231993

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.44KB5.37KB▼ 1.36%