84% woocom-disable-download-function

Code Review | WooCommerce disable download menu

WordPress plugin WooCommerce disable download menu scored84%from 54 tests.

About plugin

  • Plugin page: woocom-disable-do...
  • Plugin version: 1.002
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2018
  • Latest release: Aug 26, 2023
  • Number of updates: 4
  • Update frequency: every 467.8 days
  • Top authors: hemthapa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,033 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼11.40ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce disable download menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.85 ▼3.40
Dashboard /wp-admin3.31 ▼0.0441.70 ▼18.95
Posts /wp-admin/edit.php3.36 ▲0.0043.27 ▼2.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0074.21 ▼20.27
Media Library /wp-admin/upload.php3.23 ▲0.0033.57 ▲0.72

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce disable download menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.111.62 ▼0.0239.08 ▼4.07
Dashboard /wp-admin2,195 ▲285.62 ▲0.0392.43 ▼7.0741.62 ▲7.19
Posts /wp-admin/edit.php2,097 ▼01.97 ▼0.0339.06 ▲2.9636.25 ▲1.65
Add New Post /wp-admin/post-new.php1,531 ▼423.31 ▲4.81652.70 ▼16.7354.72 ▼14.02
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0594.70 ▲1.1842.74 ▲3.24

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocom-disable-download-function/woocom-disable-download-menu.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: woocommerce, disable download, my-account

woocom-disable-download-function/woocom-disable-download-menu.php 92% from 13 tests

The main file in "WooCommerce disable download menu" v. 1.002 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocom-disable-download-function.php" instead of "woocom-disable-download-menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1297

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin