84% html-plus-recent-posts-by-category-widget

Code Review | HTML Plus Recent Posts by Category Widget

WordPress plugin HTML Plus Recent Posts by Category Widget scored 84% from 54 tests.

About plugin

  • Plugin page: html-plus-recent-...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.8.1
  • First release: Oct 12, 2016
  • Latest release: Oct 11, 2021
  • Number of updates: 32
  • Update frequency: every 57.0 days
  • Top authors: linux4me2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,217 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼142.29ms] Passed 4 tests

This is a short check of server-side resources used by HTML Plus Recent Posts by Category Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1636.26 ▲10.02
Dashboard /wp-admin3.11 ▲0.0555.01 ▲5.81
Posts /wp-admin/edit.php3.16 ▲0.0543.93 ▼2.32
Add New Post /wp-admin/post-new.php5.47 ▲0.04104.36 ▼566.24
Media Library /wp-admin/upload.php3.05 ▲0.0433.79 ▼6.39

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_html_plus_recent_posts_by_category_widget

Browser metrics Passed 4 tests

An overview of browser requirements for HTML Plus Recent Posts by Category Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.90 ▼0.048.22 ▼1.4247.68 ▼6.55
Dashboard /wp-admin2,973 ▲425.88 ▼0.07139.42 ▼10.73114.23 ▼5.30
Posts /wp-admin/edit.php2,739 ▲32.69 ▼0.0267.08 ▲1.40100.62 ▲1.99
Add New Post /wp-admin/post-new.php1,498 ▼9618.82 ▲0.10382.01 ▼16.50117.10 ▼4.54
Media Library /wp-admin/upload.php1,810 ▲35.01 ▼0.03149.04 ▼19.07125.21 ▲1.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_html_plus_recent_posts_by_category_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/html-plus-recent-posts-by-category-widget/html-plus-rec-posts-by-cat.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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: recent posts, widget, category

html-plus-recent-posts-by-category-widget/html-plus-rec-posts-by-cat.php 92% from 13 tests

The entry point to "HTML Plus Recent Posts by Category Widget" version 2.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("html-plus-recent-posts-by-category-widget.php" instead of "html-plus-rec-posts-by-cat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected369 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP136149369

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.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
PNG images were not found in this plugin