73% wptao-sms

Code Review | WordPress短信服务(SMS)

WordPress plugin WordPress短信服务(SMS) scored73%from 54 tests.

About plugin

  • Plugin page: wptao-sms
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2018
  • Latest release: Aug 20, 2019
  • Number of updates: 10
  • Update frequency: every 52.1 days
  • Top authors: smyx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,374 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.93ms] Passed 4 tests

Server-side resources used by WordPress短信服务(SMS)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.70 ▲0.40
Dashboard /wp-admin3.35 ▼0.0041.52 ▼17.69
Posts /wp-admin/edit.php3.40 ▲0.0440.42 ▼7.46
Add New Post /wp-admin/post-new.php5.93 ▲0.0480.39 ▼22.98
Media Library /wp-admin/upload.php3.27 ▲0.0435.84 ▲1.34
短信服务 /wp-admin/admin.php?page=wptao-sms3.2541.04
手机用户 /wp-admin/admin.php?page=wptao-sms-user3.2129.31

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

WordPress短信服务(SMS): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.36 ▲0.011.68 ▼0.2644.89 ▲2.45
Dashboard /wp-admin2,216 ▲395.53 ▼0.0882.50 ▼4.3045.56 ▲1.56
Posts /wp-admin/edit.php2,127 ▲272.00 ▲0.0233.40 ▼1.8440.18 ▲3.66
Add New Post /wp-admin/post-new.php1,548 ▲2223.11 ▲0.03644.43 ▲26.2553.33 ▼1.17
Media Library /wp-admin/upload.php1,424 ▲244.18 ▼0.0297.08 ▼13.5848.33 ▲0.42
短信服务 /wp-admin/admin.php?page=wptao-sms1,6791.8225.1288.25
手机用户 /wp-admin/admin.php?page=wptao-sms-user7832.0223.8832.55

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=wptao-sms-user
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wptao_sms_user_do_page' not found or invalid function name

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wptao-sms/wptao-sms.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=wptao-sms
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: a(...).live is not a function" "TypeError: a(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wptao-sms/js/admin.js?ver=1.0.3:1:43)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=wptao-sms
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: a(...).live is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === wptao-sms === )
Please take inspiration from this readme.txt

wptao-sms/wptao-sms.php Passed 13 tests

The primary PHP file in "WordPress短信服务(SMS)" version 1.0.3 is used by WordPress to initiate all plugin functionality
61 characters long description:
支持手机号注册/登录,重要事件短信通知等。

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
There were no executable files found in this plugin159 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP139158
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin