89% woocommerce-login-popup-and-shortcodes

Code Review | WooCommerce Login Popup and Shortcodes

WordPress plugin WooCommerce Login Popup and Shortcodes scored 89% from 54 tests.

About plugin

  • Plugin page: woocommerce-login...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 5.8.1
  • First release: Apr 6, 2017
  • Latest release: Mar 26, 2018
  • Number of updates: 5
  • Update frequency: every 70.8 days
  • Top authors: phpbits (100%)

Code review

54 tests

User reviews

120 reviews

Install metrics

2,000+ active / 34,721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼141.68ms] Passed 4 tests

Server-side resources used by WooCommerce Login Popup and Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0636.92 ▲11.11
Dashboard /wp-admin3.16 ▲0.1041.00 ▼3.65
Posts /wp-admin/edit.php3.21 ▲0.0941.84 ▼9.90
Add New Post /wp-admin/post-new.php5.51 ▲0.0889.81 ▼557.58
Media Library /wp-admin/upload.php3.10 ▲0.0933.19 ▲4.43
Login Popup /wp-admin/admin.php?page=woo_login_popup_sc_settings3.0728.27

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 1 new option
New WordPress options
woo_login_popup_sc_installDate

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Login Popup and Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲5615.80 ▲0.139.25 ▼1.4148.97 ▲2.21
Dashboard /wp-admin2,973 ▲425.91 ▼0.06136.19 ▼10.68111.45 ▼5.98
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0069.60 ▲4.7585.63 ▼3.38
Add New Post /wp-admin/post-new.php1,876 ▲419.15 ▲0.02363.19 ▼22.37110.60 ▲6.41
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.00150.02 ▼2.27116.16 ▼1.73
Login Popup /wp-admin/admin.php?page=woo_login_popup_sc_settings1,2502.2354.1088.43

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
  • Zombie WordPress options detected upon uninstall: 1 option
    • woo_login_popup_sc_installDate

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (WooCommerce Login Popup), #2 (WooCommerce Registration Modal), #3 (WooCommerce Reset Password Popup), #4 (WooCommerce Login Shortcode), #5 (Already Loggedin Customer Popup), #6 (Settings Page)
The official readme.txt is a good inspiration

woocommerce-login-popup-and-shortcodes/plugin.php 69% from 13 tests

"WooCommerce Login Popup and Shortcodes" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-login-popup-and-shortcodes.php" instead of "plugin.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin821 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11118161529
Sass1237231
JavaScript28060
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity2.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods3
▷ Static methods133.33%
▷ Public methods133.33%
▷ Protected methods00.00%
▷ Private methods266.67%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
No PNG images were found in this plugin