90% moodgiver-hide-shop-categories

Code Review | Hide Shop Categories for Woocommerce

WordPress plugin Hide Shop Categories for Woocommerce scored90%from 54 tests.

About plugin

  • Plugin page: moodgiver-hide-sh...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 29, 2018
  • Latest release: Nov 29, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: swinaallen (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,453 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼11.51ms] Passed 4 tests

An overview of server-side resources used by Hide Shop Categories for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.95 ▼4.15
Dashboard /wp-admin3.35 ▲0.0153.06 ▼21.36
Posts /wp-admin/edit.php3.40 ▲0.0546.42 ▼3.70
Add New Post /wp-admin/post-new.php5.95 ▲0.0695.85 ▼16.81
Media Library /wp-admin/upload.php3.27 ▲0.0541.05 ▲5.85
Woo Hide Categories /wp-admin/tools.php?page=mg_hide_wc_categories3.2533.32

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide Shop Categories for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.68 ▲0.661.60 ▼0.1441.47 ▼1.25
Dashboard /wp-admin2,206 ▲265.66 ▼0.1991.48 ▲5.7439.55 ▲0.93
Posts /wp-admin/edit.php2,111 ▲112.00 ▲0.0135.97 ▼1.8034.14 ▼2.44
Add New Post /wp-admin/post-new.php1,536 ▲1023.23 ▼0.42638.01 ▼37.0445.94 ▼13.08
Media Library /wp-admin/upload.php1,411 ▲144.26 ▲0.09102.49 ▼13.9445.18 ▼4.55
Woo Hide Categories /wp-admin/tools.php?page=mg_hide_wc_categories8502.0023.2048.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: woocommerce, shop, shop categories, product categories

moodgiver-hide-shop-categories/main.php 92% from 13 tests

The entry point to "Hide Shop Categories for Woocommerce" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("moodgiver-hide-shop-categories.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin265 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32547158
CSS13080
JavaScript13127

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected