99% hide-price-until-login

Code Review | Hide Price Until Login

WordPress plugin Hide Price Until Login scored 99% from 54 tests.

About plugin

  • Plugin page: hide-price-until-...
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.7
  • WordPress version: 5.8.1
  • First release: May 27, 2016
  • Latest release: Nov 19, 2021
  • Number of updates: 40
  • Update frequency: every 50.1 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

4,000+ active / 38,278 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Hide Price Until Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0024.08 ▲4.02
Dashboard /wp-admin3.06 ▼0.0031.80 ▼6.35
Posts /wp-admin/edit.php3.11 ▲0.0028.73 ▼2.50
Add New Post /wp-admin/post-new.php5.42 ▼0.0267.40 ▼581.51
Media Library /wp-admin/upload.php3.00 ▲0.0021.94 ▼0.48

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Hide Price Until Login
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.95 ▲0.086.41 ▲1.0076.52 ▼2.68
Dashboard /wp-admin2,930 ▲386.10 ▲0.00115.84 ▼15.34168.11 ▼9.25
Posts /wp-admin/edit.php2,737 ▼33.22 ▼0.0163.83 ▼0.13135.41 ▼0.27
Add New Post /wp-admin/post-new.php3,741 ▼6618.61 ▲0.21429.15 ▼58.39158.32 ▼20.02
Media Library /wp-admin/upload.php1,752 ▼05.50 ▼0.00144.35 ▲5.76191.59 ▲2.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 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)
Good news, no errors were detected

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

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: woocommerce plugin, woocommerce protected price plugin, woocommerce hide price until login extension, woocommerce, woocommerce user role based hide price...

hide-price-until-login/hide-price.php 85% from 13 tests

The primary PHP file in "Hide Price Until Login" version 1.0.11 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hide-price-until-login.php" instead of "hide-price.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.8" instead of "4.3")

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 detected2,069 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PO File1120130291

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions47100.00%
▷ Anonymous functions00.00%
▷ Global constants6100.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
There are no PNG files in this plugin