89% hide-price-until-login

Code Review | Hide Price Until Login

WordPress plugin Hide Price Until Login scored89%from 54 tests.

About plugin

  • Plugin page: hide-price-until-...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0.0
  • WordPress version: 6.3.1
  • First release: May 27, 2016
  • Latest release: Jul 18, 2022
  • Number of updates: 44
  • Update frequency: every 51.0 days
  • Top authors: cedcommerce (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

4,000+ active /52,965 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Hide Price Until Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.17 ▼5.27
Dashboard /wp-admin3.31 ▲0.0052.52 ▲1.16
Posts /wp-admin/edit.php3.36 ▲0.0050.34 ▼0.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.96 ▼14.10
Media Library /wp-admin/upload.php3.23 ▲0.0037.40 ▲1.05

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

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

Browser metrics Passed 4 tests

Hide Price Until Login: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.451.99 ▲0.1544.06 ▲0.72
Dashboard /wp-admin2,195 ▲215.61 ▲0.0887.28 ▼3.7942.79 ▼1.71
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0136.01 ▼1.4936.94 ▲0.27
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▼0.12654.64 ▼48.5852.92 ▼6.88
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0999.82 ▼15.0846.11 ▼0.09

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin admin general setting for hide price until login feature.), #2 (Plugin admin general setting (Login/Register) for hide price until login feature.), #3 (Plugin admin general setting (Password) for hide price until login feature.), #4 (Plugin admin captcha setting for hide price until login feature.), #5 (Plugin frontend section of shop page for hide price until login feature.), #6 (Plugin frontend section of product detail page for hide price until login feature.), #7 (Plugin frontend section of hide Price Using Password to place order.), #8 (Plugin frontend section of cart page for hide price until login feature.), #9 (Plugin frontend section of checkout page for hide price until login feature .), #10 (Plugin frontend section of Thank you page for hide price until login feature.), #11 (Plugin frontend section of registration popup for hide price until login feature.), #12 (Plugin frontend section of login popup for hide price until login feature.)
Please take inspiration from this readme.txt

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

The main PHP script in "Hide Price Until Login" version 1.1.1 is automatically included on every request by WordPress
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 ("hide-price-until-login.php" instead of "hide-price.php")
  • Requires at least: Required version does not match 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected2,194 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP61723951,262
CSS52313325
JavaScript85131316
PO File1120130291

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon.png9.15KB0.80KB▼ 91.21%