83% hide-category

Code Review | Hide Product & Post Categories

WordPress plugin Hide Product & Post Categories scored83%from 54 tests.

About plugin

  • Plugin page: hide-category
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 6, 2022
  • Latest release: Jan 7, 2022
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: zworthkey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /397 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.88MB] [CPU: ▼28.35ms] Passed 4 tests

An overview of server-side resources used by Hide Product & Post Categories
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.83 ▼0.6318.03 ▼21.44
Dashboard /wp-admin3.26 ▼0.0533.10 ▼15.50
Posts /wp-admin/edit.php3.19 ▼0.1727.02 ▼17.13
Add New Post /wp-admin/post-new.php3.21 ▼2.6831.29 ▼59.34
Media Library /wp-admin/upload.php3.29 ▲0.0634.80 ▼2.08

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
recovery_mode_email_last_sent
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Hide Product & Post Categories: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,477 ▼1,26912.62 ▼2.120.40 ▼1.3414.51 ▼32.09
Dashboard /wp-admin1,239 ▼9461.38 ▼4.4812.96 ▼107.7430.88 ▼12.39
Posts /wp-admin/edit.php32 ▼2,0570.44 ▼1.550.06 ▼36.844.02 ▼32.09
Add New Post /wp-admin/post-new.php45 ▼1,4880.44 ▼23.010.07 ▼695.9912.39 ▼57.30
Media Library /wp-admin/upload.php1,386 ▼54.18 ▼0.07109.80 ▲2.2274.56 ▲30.16

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 detected upon uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • can_compress_scripts
    • 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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/hide-category/public/partials/wc-hide-category-public-display.php
    • > /wp-content/plugins/hide-category/admin/partials/wc-hide-category-admin-display.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)
There were no browser issues found

Optimizations

Plugin configuration 87% 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: "zworthkey.com/about-us"
  • Plugin Name: You should set the name of your plugin on the first line ( === hide-category === )
Please take inspiration from this readme.txt

hide-category/wc-hide-category.php 85% from 13 tests

"Hide Product & Post Categories" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hide-category.php" instead of "wc-hide-category.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin308 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13154566302
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected