78% woocommerce-remove-quantity-text

Code Review | Woocommerce Remove Quantity Text

WordPress plugin Woocommerce Remove Quantity Text scored78%from 54 tests.

About plugin

  • Plugin page: woocommerce-remov...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2013
  • Latest release: Feb 27, 2013
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: raviraiya (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /4,271 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Woocommerce Remove Quantity Text
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.67 ▼4.40
Dashboard /wp-admin3.33 ▼0.0249.82 ▼17.72
Posts /wp-admin/edit.php3.38 ▲0.0248.29 ▲0.50
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.65 ▼8.50
Media Library /wp-admin/upload.php3.25 ▲0.0235.65 ▲2.02
WooCommerce Remove Qty Text Options /wp-admin/options-general.php?page=wooremoveqtytext-options_options3.2232.05

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Remove Quantity Text
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.14 ▼0.211.80 ▼0.1844.47 ▲0.86
Dashboard /wp-admin2,202 ▲255.61 ▼0.0685.51 ▼13.9541.69 ▲0.34
Posts /wp-admin/edit.php2,104 ▲12.12 ▲0.1038.11 ▲1.7234.82 ▼2.84
Add New Post /wp-admin/post-new.php1,531 ▲523.13 ▲0.23658.17 ▲5.3551.50 ▼0.58
Media Library /wp-admin/upload.php1,404 ▲74.22 ▲0.0495.70 ▼7.8242.36 ▼2.49
WooCommerce Remove Qty Text Options /wp-admin/options-general.php?page=wooremoveqtytext-options_options9171.9924.5234.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wooremoveqtytext-options_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wooremoveqtytext-options_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/woocommerce-remove-quantity-text/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woocommerce-remove-quantity-text/index.php:103

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Go To setting -> Woocommerce Remove Qty option.), #2 (select the product type where you want to hide quantity.)
Please take inspiration from this readme.txt

woocommerce-remove-quantity-text/index.php 92% from 13 tests

The main file in "Woocommerce Remove Quantity Text" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-remove-quantity-text.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected119 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22138119

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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