10% vaptcha-sms

Code Review | vaptcha-sms 手机登录注册

WordPress plugin vaptcha-sms 手机登录注册 scored 10% from 54 tests.

About plugin

  • Plugin page: vaptcha-sms
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 9, 2021
  • Latest release: Sep 23, 2021
  • Number of updates: 12
  • Update frequency: every 14.1 days
  • Top authors: vaptcha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 530 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/vaptcha-sms/VaptchaSmsPlugin.php+24
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.38MB] [CPU: ▼159.75ms] Passed 4 tests

Server-side resources used by vaptcha-sms 手机登录注册
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.08 ▲0.2445.78 ▲10.73
Dashboard /wp-admin3.38 ▲0.3239.45 ▼7.04
Posts /wp-admin/edit.php3.42 ▲0.3145.52 ▼1.57
Add New Post /wp-admin/post-new.php3.15 ▼2.2927.69 ▼629.10
Media Library /wp-admin/upload.php3.25 ▲0.2437.79 ▼1.30

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 1 new option
New WordPress options
vaptcha_options

Browser metrics Passed 4 tests

vaptcha-sms 手机登录注册: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,739 ▲14315.83 ▲0.339.52 ▲0.6853.00 ▲0.28
Dashboard /wp-admin2,997 ▲606.42 ▲0.52142.83 ▼9.85119.58 ▲1.14
Posts /wp-admin/edit.php2,769 ▲302.73 ▲0.0470.61 ▲0.5993.15 ▲0.11
Add New Post /wp-admin/post-new.php1,703 ▲2017.07 ▼1.78370.09 ▼20.13111.51 ▼7.32
Media Library /wp-admin/upload.php1,837 ▲305.32 ▲0.32154.47 ▼15.67128.78 ▲9.56

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • vaptcha_options

Smoke tests 50% from 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 0% from 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
Please fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/vaptcha-sms/VaptchaSmsPlugin.php
    • > /wp-content/plugins/vaptcha-sms/options.php
    • > /wp-content/plugins/vaptcha-sms/lib/VaptchaSms.class.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/vaptcha-sms/vaptcha-sms.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: sms

vaptcha-sms/vaptcha-sms.php 92% from 13 tests

The main PHP file in "vaptcha-sms 手机登录注册" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,865 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP81122241,214
JavaScript22625351
CSS13641212
PO File1346188

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.24
Average class complexity40.50
▷ Minimum class complexity39.00
▷ Maximum class complexity42.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods56
▷ Static methods58.93%
▷ Public methods4376.79%
▷ Protected methods00.00%
▷ Private methods1323.21%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dropdown.png41.19KB0.29KB▼ 99.30%
images/vaptcha-logo.png2.20KB1.49KB▼ 32.25%