84% hide-sub-categories-products

Code Review | Hide sub categories products

WordPress plugin Hide sub categories products scored84%from 54 tests.

About plugin

  • Plugin page: hide-sub-categori...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 8, 2020
  • Latest release: Feb 8, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ravisinghit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /392 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.01MB] [CPU: ▼6.16ms] Passed 4 tests

An overview of server-side resources used by Hide sub categories products
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.42 ▼6.68
Dashboard /wp-admin3.31 ▲0.0147.45 ▼3.71
Posts /wp-admin/edit.php3.36 ▲0.0148.60 ▲3.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.27 ▼5.98
Media Library /wp-admin/upload.php3.24 ▲0.0134.41 ▼8.26

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Hide sub categories products
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.57 ▼1.045.47 ▲3.6142.02 ▼6.22
Dashboard /wp-admin2,213 ▲254.84 ▼0.05100.68 ▼14.0937.91 ▼6.59
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0139.47 ▲3.2734.59 ▼0.17
Add New Post /wp-admin/post-new.php1,518 ▼117.54 ▼5.73676.42 ▲3.6451.00 ▼4.57
Media Library /wp-admin/upload.php1,392 ▲104.22 ▲0.0596.45 ▼5.0741.97 ▼3.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/hide-sub-categories-products/admin/partials/hide-sub-categories-products-admin-display.php
    • > /wp-content/plugins/hide-sub-categories-products/public/partials/hide-sub-categories-products-public-display.php

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Hide sub categories products === )
The official readme.txt is a good inspiration

hide-sub-categories-products/hide-sub-categories-products.php Passed 13 tests

The main PHP script in "Hide sub categories products" version 1.0.0 is automatically included on every request by WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin190 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12118535184
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin