84% category-archive-widget

Code Review | Category Archive Widget

WordPress plugin Category Archive Widget scored84%from 54 tests.

About plugin

  • Plugin page: category-archive-...
  • Plugin version: 1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 18, 2019
  • Latest release: Jun 14, 2023
  • Number of updates: 6
  • Update frequency: every 212.3 days
  • Top authors: kazbekkadalashvili (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /3,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Category Archive Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.34 ▲3.30
Dashboard /wp-admin3.35 ▲0.0555.48 ▲8.45
Posts /wp-admin/edit.php3.40 ▲0.0545.24 ▼2.90
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.85 ▼4.92
Media Library /wp-admin/upload.php3.27 ▲0.0534.77 ▲0.22

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_category-archive-widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Category Archive Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.36 ▲0.091.74 ▼0.1643.61 ▲0.28
Dashboard /wp-admin2,198 ▲215.64 ▼0.0287.27 ▼1.0840.93 ▲2.16
Posts /wp-admin/edit.php2,097 ▼31.98 ▲0.0033.35 ▼3.2134.71 ▲1.83
Add New Post /wp-admin/post-new.php1,526 ▼223.27 ▲0.28686.17 ▲31.3162.22 ▼4.31
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.10105.93 ▲1.3946.54 ▲1.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_category-archive-widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-archive-widget/category-archive-widget.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: category, archive

category-archive-widget/category-archive-widget.php 92% from 13 tests

The principal PHP file in "Category Archive Widget" v. 1.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Requires at least: Required version number should use periods and dots only (ex. "7.0" instead of "6")

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
Good job! No executable or dangerous file extensions detected232 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11415232

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity10.20
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png26.29KB7.93KB▼ 69.83%