90% hide-cart-price-for-visitors-woocommerce

Code Review | Hide Cart & Price For Visitors Woocommerce

WordPress plugin Hide Cart & Price For Visitors Woocommerce scored90%from 54 tests.

About plugin

  • Plugin page: hide-cart-price-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 6.3.1
  • First release: Jul 13, 2017
  • Latest release: Jul 13, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: dadodd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /778 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Hide Cart & Price For Visitors Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.23 ▼4.85
Dashboard /wp-admin3.31 ▲0.0150.68 ▲0.13
Posts /wp-admin/edit.php3.36 ▲0.0149.18 ▲0.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.68 ▼5.58
Media Library /wp-admin/upload.php3.23 ▲0.0139.59 ▲2.09

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Hide Cart & Price For Visitors Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.101.65 ▼0.1040.43 ▼5.13
Dashboard /wp-admin2,198 ▲185.61 ▼0.0585.71 ▼7.2943.90 ▲0.81
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0238.94 ▼0.2435.38 ▼0.04
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.26672.43 ▼45.2353.94 ▼6.28
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0499.03 ▼8.3947.10 ▲6.10

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: hide cart, woocomerce, hide price

hide-cart-price-for-visitors-woocommerce/hidecartandprice.php 92% from 13 tests

The entry point to "Hide Cart & Price For Visitors Woocommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hide-cart-price-for-visitors-woocommerce.php" instead of "hidecartandprice.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
There were no executable files found in this plugin18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14718

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin