84% widget-to-show-posts-in-current-category

Code Review | Widget to Display Posts from Current Category

WordPress plugin Widget to Display Posts from Current Category scored84%from 54 tests.

About plugin

  • Plugin page: widget-to-show-po...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: May 5, 2019
  • Number of updates: 17
  • Update frequency: every 113.9 days
  • Top authors: gruz0 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /2,699 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.08ms] Passed 4 tests

This is a short check of server-side resources used by Widget to Display Posts from Current Category
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.17 ▼7.19
Dashboard /wp-admin3.34 ▲0.0445.08 ▼4.44
Posts /wp-admin/edit.php3.39 ▲0.0356.41 ▲4.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.42 ▼15.94
Media Library /wp-admin/upload.php3.26 ▲0.0334.97 ▼0.74

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget to Display Posts from Current Category
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼0.914.45 ▲2.5942.47 ▼8.01
Dashboard /wp-admin2,206 ▲185.80 ▲0.8793.82 ▼20.1540.84 ▼5.82
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0440.20 ▲3.4238.33 ▲5.20
Add New Post /wp-admin/post-new.php1,542 ▲19022.92 ▲5.76679.06 ▲86.9658.70 ▼2.73
Media Library /wp-admin/upload.php1,382 ▼64.25 ▲0.0598.22 ▼6.2441.95 ▼2.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_gruz0_posts_in_current_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/widget-to-show-posts-in-current-category/widget-to-display-posts-from-current-category.php

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: widget, related, same, category, post

widget-to-show-posts-in-current-category/widget-to-display-posts-from-current-category.php 92% from 13 tests

The main PHP script in "Widget to Display Posts from Current Category" version 0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("widget-to-show-posts-in-current-category.php" instead of "widget-to-display-posts-from-current-category.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin130 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13025130

PHP code Passed 2 tests

A short 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.37
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin