10% posts-categories-in-sidebar

Code Review | Post's Categories in Sidebar

WordPress plugin Post's Categories in Sidebar scored10%from 54 tests.

About plugin

  • Plugin page: posts-categories-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.3
  • WordPress version: 6.3.1
  • First release: Jan 4, 2012
  • Latest release: Jan 4, 2012
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: zevdesigns (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,398 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/posts-categories-in-sidebar/cz_post_cat.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; Post_Cat_Widget has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼58.35ms] Passed 4 tests

A check of server-side resources used by Post's Categories in Sidebar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.33 ▼38.89
Dashboard /wp-admin2.09 ▼1.2611.23 ▼57.13
Posts /wp-admin/edit.php2.09 ▼1.276.10 ▼42.23
Add New Post /wp-admin/post-new.php2.09 ▼3.805.37 ▼95.14
Media Library /wp-admin/upload.php2.09 ▼1.145.95 ▼30.14

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Post's Categories in Sidebar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.46 ▼0.911.88 ▲0.0741.72 ▼7.52
Dashboard /wp-admin2,200 ▲155.83 ▼0.02105.68 ▲0.6740.83 ▲2.90
Posts /wp-admin/edit.php2,086 ▼02.01 ▼0.0136.72 ▼2.4031.48 ▼3.83
Add New Post /wp-admin/post-new.php1,533 ▲1423.55 ▲0.32659.31 ▼55.3253.00 ▼8.67
Media Library /wp-admin/upload.php1,379 ▼64.22 ▼0.0299.03 ▼15.2744.45 ▼2.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/posts-categories-in-sidebar/cz_post_cat.php+12
    Methods with the same name as their class will not be constructors in a future version of PHP; Post_Cat_Widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_cz_post_cat
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Please fix the following
  • 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/posts-categories-in-sidebar/cz_post_cat.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === posts-categories-in-sidebar === )
  • Screenshots: These screenshots do not have images: #1 (The widget in use. Styled according to the normal widget sidebar.), #2 (The Application -> Widgets page)
The official readme.txt might help

posts-categories-in-sidebar/cz_post_cat.php 92% from 13 tests

The principal PHP file in "Post's Categories in Sidebar" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("posts-categories-in-sidebar.php" instead of "cz_post_cat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin47 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181047

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.35MB with 0.22MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png337.59KB164.94KB▼ 51.14%
screenshot-2.png25.61KB7.62KB▼ 70.23%