83% woo-sms-login-validator

Code Review | Woo SMS Login Validator

WordPress plugin Woo SMS Login Validator scored83%from 54 tests.

About plugin

  • Plugin page: woo-sms-login-val...
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: May 24, 2016
  • Latest release: Oct 17, 2016
  • Number of updates: 6
  • Update frequency: every 24.3 days
  • Top authors: shudong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,053 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

A check of server-side resources used by Woo SMS Login Validator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.50 ▲2.17
Dashboard /wp-admin3.31 ▲0.0144.28 ▼1.66
Posts /wp-admin/edit.php3.36 ▲0.0147.53 ▼19.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.48 ▼15.41
Media Library /wp-admin/upload.php3.23 ▲0.0137.85 ▲3.20

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Woo SMS Login Validator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9514.47 ▲0.061.89 ▲0.2739.95 ▲1.30
Dashboard /wp-admin2,222 ▲364.80 ▼0.16106.11 ▼8.2543.55 ▲4.21
Posts /wp-admin/edit.php2,102 ▲62.04 ▲0.0339.25 ▼0.4636.32 ▼4.25
Add New Post /wp-admin/post-new.php1,561 ▲1918.32 ▲0.02609.32 ▼11.3066.25 ▲7.83
Media Library /wp-admin/upload.php1,407 ▲224.19 ▼0.0095.03 ▼5.8842.38 ▼0.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-sms-login-validator/woo-sms-login.php:17

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 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (myaccount login), #2 (checkout login), #3 (插件后台 - General Settings)
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

woo-sms-login-validator/woo-sms-login.php 77% from 13 tests

"Woo SMS Login Validator" version 0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-sms-login-validator.php" instead of "woo-sms-login.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 159 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected85 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP181147
PO File110036
Markdown1102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
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%
Functions5
▷ Named functions5100.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
6 PNG files occupy 0.32MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png80.00KB20.75KB▼ 74.06%
screenshot-1.png42.58KB10.79KB▼ 74.65%
images/screenshot-1.png42.58KB10.79KB▼ 74.65%
screenshot-2.png41.59KB10.59KB▼ 74.53%
images/screenshot-3.png80.00KB20.75KB▼ 74.06%