90% hide-posts-by-category

Code Review | Hide Posts By Category

WordPress plugin Hide Posts By Category scored90%from 54 tests.

About plugin

  • Plugin page: hide-posts-by-cat...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.3
  • WordPress version: 6.3.1
  • First release: Nov 21, 2019
  • Latest release: Nov 21, 2019
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: walfridooliveira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /429 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.54MB] [CPU: ▼26.68ms] Passed 4 tests

A check of server-side resources used by Hide Posts By Category
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.6516.28 ▼24.80
Dashboard /wp-admin3.24 ▼0.0635.38 ▼15.59
Posts /wp-admin/edit.php3.17 ▼0.1828.89 ▼19.39
Add New Post /wp-admin/post-new.php4.64 ▼1.2543.51 ▼46.94
Media Library /wp-admin/upload.php3.27 ▲0.0430.66 ▼4.06
Hide Posts /wp-admin/options-general.php?page=hpbc3.2432.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Hide Posts By Category
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.61 ▼0.771.70 ▼0.1143.55 ▼0.74
Dashboard /wp-admin2,210 ▲224.85 ▲0.01109.71 ▼10.1842.90 ▼0.03
Posts /wp-admin/edit.php2,090 ▼22.02 ▲0.0136.86 ▲1.2132.92 ▼1.80
Add New Post /wp-admin/post-new.php1,536 ▲323.37 ▼0.22658.21 ▼2.0255.17 ▼3.47
Media Library /wp-admin/upload.php1,383 ▼84.30 ▲0.1296.25 ▼2.4742.25 ▼1.43
Hide Posts /wp-admin/options-general.php?page=hpbc8472.0824.0825.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: pots, hide

hide-posts-by-category/hide-posts-by-category.php 92% from 13 tests

The main PHP file in "Hide Posts By Category" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected260 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23212176
PO File1212362
JavaScript17022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.55
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%
Functions8
▷ Named functions8100.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
PNG images were not found in this plugin