78% hide-a-post

Code Review | Hide Posts by Category

WordPress plugin Hide Posts by Category scored 78% from 54 tests.

About plugin

  • Plugin page: hide-a-post
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Dec 21, 2019
  • Latest release: Dec 22, 2019
  • Number of updates: 12
  • Update frequency: every 1.6 days
  • Top authors: jrybacek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 467 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.76ms] Passed 4 tests

Analyzing server-side resources used by Hide Posts by Category
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.64 ▼3.49
Dashboard /wp-admin3.34 ▲0.0444.57 ▼9.95
Posts /wp-admin/edit.php3.39 ▲0.0342.99 ▼3.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.42 ▼14.02
Media Library /wp-admin/upload.php3.26 ▲0.0334.73 ▲3.15
Hide A Post /wp-admin/options-general.php?page=hap3.2028.14

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

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Posts by Category
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.81 ▲0.441.92 ▲0.0737.98 ▼1.55
Dashboard /wp-admin2,207 ▲195.82 ▲0.9897.02 ▼3.2939.34 ▼3.38
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0737.46 ▼0.1834.12 ▼0.75
Add New Post /wp-admin/post-new.php1,537 ▲423.16 ▼0.12678.35 ▲20.1360.69 ▲9.97
Media Library /wp-admin/upload.php1,389 ▼24.21 ▲0.0495.63 ▼7.9343.03 ▼5.14
Hide A Post /wp-admin/options-general.php?page=hap8092.0223.2524.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=hap
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=hap
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/hide-a-post/hide-a-post.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 errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: A description for screenshot #3 is missing in hide-a-post/assets to your readme.txt
Please take inspiration from this readme.txt

hide-a-post/hide-a-post.php Passed 13 tests

This is the main PHP file of "Hide Posts by Category" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
128 characters long description:
WordPress plugin that hides posts on the site, search, and WordPress admin from non-Administrators using one or more categories.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin196 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11812148
Markdown121048

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshot-2.png49.15KB25.32KB▼ 48.47%
images/screenshot-3.png29.27KB14.32KB▼ 51.07%
images/screenshot-1.png85.00KB42.48KB▼ 50.02%