83% show-custom-category

Code Review | Show Custom Category

WordPress plugin Show Custom Category scored 83% from 54 tests.

About plugin

  • Plugin page: show-custom-category
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4.11+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.3-5.9.3
  • WordPress version: 6.3.1
  • First release: May 5, 2022
  • Latest release: May 5, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: alighavidel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 187 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.13ms] Passed 4 tests

Server-side resources used by Show Custom Category
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.69 ▼2.06
Dashboard /wp-admin3.32 ▲0.0147.87 ▼4.16
Posts /wp-admin/edit.php3.37 ▲0.0148.72 ▲2.85
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.03 ▲11.08
Media Library /wp-admin/upload.php3.24 ▲0.0134.25 ▲2.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Show Custom Category
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.47 ▼0.071.71 ▼0.3740.90 ▼13.48
Dashboard /wp-admin2,203 ▲156.07 ▲0.26106.34 ▼8.9542.98 ▼6.69
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0342.30 ▲5.9940.14 ▲3.72
Add New Post /wp-admin/post-new.php6,483 ▲4,95020.54 ▼2.61886.77 ▲275.4064.20 ▼0.48
Media Library /wp-admin/upload.php1,385 ▼34.23 ▼0.01108.90 ▲8.5645.71 ▲3.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-custom-category/index.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/show-custom-category/form.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (how it shows in dashboard), #2 (how it shows in post without adding class)
Please take inspiration from this readme.txt

show-custom-category/index.php 85% from 13 tests

The primary PHP file in "Show Custom Category" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("show-custom-category.php" instead of "index.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 163 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin71 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP282771

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.63
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png34.62KB18.58KB▼ 46.34%
screenshot-1.png47.37KB22.69KB▼ 52.09%