84% disable-woocommerce-categories

Code Review | Disable Woocommerce Categories

WordPress plugin Disable Woocommerce Categories scored84%from 54 tests.

About plugin

  • Plugin page: disable-woocommer...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 5, 2018
  • Latest release: Jul 5, 2018
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: namadnuno (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /488 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.82ms] Passed 4 tests

An overview of server-side resources used by Disable Woocommerce Categories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.59 ▼3.97
Dashboard /wp-admin3.31 ▲0.0047.16 ▼1.24
Posts /wp-admin/edit.php3.36 ▲0.0045.38 ▼8.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.01 ▼5.94
Media Library /wp-admin/upload.php3.23 ▲0.0038.97 ▲0.17

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Disable Woocommerce Categories
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.291.90 ▲0.1240.46 ▼0.62
Dashboard /wp-admin2,195 ▲185.59 ▲0.0293.82 ▼0.1038.50 ▲0.71
Posts /wp-admin/edit.php2,100 ▼31.98 ▲0.0439.24 ▲4.6036.53 ▼1.47
Add New Post /wp-admin/post-new.php1,526 ▼023.09 ▼0.77666.21 ▼4.7752.38 ▼2.58
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.01100.83 ▼9.5547.71 ▲1.09

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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)
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/disable-woocommerce-categories/disable-woocommerce-category.php:26

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were detected

disable-woocommerce-categories/disable-woocommerce-category.php 92% from 13 tests

"Disable Woocommerce Categories" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("disable-woocommerce-categories.php" instead of "disable-woocommerce-category.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin132 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22926132

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity2.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
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 are no PNG files in this plugin