83% show-post-categories

Code Review | Show Post Categories

WordPress plugin Show Post Categories scored83%from 54 tests.

About plugin

  • Plugin page: show-post-categories
  • Plugin version: 2.2.5
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 16, 2016
  • Latest release: Apr 28, 2020
  • Number of updates: 96
  • Update frequency: every 16.9 days
  • Top authors: willemso (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active /8,933 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Show Post Categories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.58 ▲1.58
Dashboard /wp-admin3.37 ▲0.0647.23 ▼5.72
Posts /wp-admin/edit.php3.42 ▲0.0652.13 ▼0.17
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.81 ▼19.65
Media Library /wp-admin/upload.php3.29 ▲0.0636.98 ▲1.30
Show Post Categories /wp-admin/options-general.php?page=show-post-categories3.2631.48

Server storage [IO: ▲0.04MB] [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: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
spc_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Show Post Categories
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.17 ▼0.181.87 ▼0.2945.01 ▼2.13
Dashboard /wp-admin2,202 ▲255.61 ▲0.0484.52 ▼5.9239.74 ▼9.57
Posts /wp-admin/edit.php2,107 ▲41.98 ▲0.0042.36 ▲3.6539.07 ▼1.07
Add New Post /wp-admin/post-new.php1,529 ▲323.09 ▲0.03647.25 ▼9.2759.56 ▼3.24
Media Library /wp-admin/upload.php1,401 ▲14.26 ▲0.06101.09 ▼1.3443.43 ▼5.75
Show Post Categories /wp-admin/options-general.php?page=show-post-categories8971.9923.0431.17

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/show-post-categories/show-post-categories.php
    • > /wp-content/plugins/show-post-categories/includes/excerpt.php
    • > /wp-content/plugins/show-post-categories/includes/author.php
    • > /wp-content/plugins/show-post-categories/includes/admin.php
    • > /wp-content/plugins/show-post-categories/includes/category.php
    • > /wp-content/plugins/show-post-categories/includes/core.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Version format is invalid
  • Tags: Please reduce the number of tags, currently 30 tag instead of maximum 10
Please take inspiration from this readme.txt

show-post-categories/show-post-categories.php 92% from 13 tests

The entry point to "Show Post Categories" version 2.2.5 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected462 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7178208448
PO File10014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions2191.30%
▷ Anonymous functions28.70%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin