77% wp-sms-vatansms-com

Code Review | VatanSMS WP SMS

WordPress plugin VatanSMS WP SMS scored77%from 54 tests.

About plugin

  • Plugin page: wp-sms-vatansms-com
  • Plugin version: 1.01
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5.3
  • WordPress version: 6.3.1
  • First release: Jun 10, 2020
  • Latest release: Nov 5, 2020
  • Number of updates: 4
  • Update frequency: every 40.8 days
  • Top authors: vatanyazilim (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /928 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼12.37ms] Passed 4 tests

A check of server-side resources used by VatanSMS WP SMS
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4844.61 ▼1.59
Dashboard /wp-admin4.20 ▲0.8667.16 ▼8.40
Posts /wp-admin/edit.php4.31 ▲0.9565.02 ▲18.30
Add New Post /wp-admin/post-new.php4.07 ▼1.8249.79 ▼51.04
Media Library /wp-admin/upload.php4.11 ▲0.8946.83 ▲11.57
WP-SMS Welcome /wp-admin/admin.php?page=wp-sms-welcome4.0843.52

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 93 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
widget_recent-comments
wpsms_show_welcome_page
wpsms_settings
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
wpsms_first_show_welcome_page
widget_wpsms_widget

Browser metrics Passed 4 tests

Checking browser requirements for VatanSMS WP SMS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21213.81 ▼0.845.33 ▲3.6141.62 ▼0.94
Dashboard /wp-admin2,258 ▲704.87 ▼1.03104.06 ▼4.77104.71 ▲64.32
Posts /wp-admin/edit.php2,140 ▲541.98 ▼0.0037.59 ▲1.7133.85 ▼3.12
Add New Post /wp-admin/post-new.php1,559 ▲4023.24 ▲0.23698.86 ▲97.8655.46 ▼16.45
Media Library /wp-admin/upload.php1,427 ▲454.21 ▼0.00101.74 ▼2.5675.25 ▲29.73
WP-SMS Welcome /wp-admin/admin.php?page=wp-sms-welcome8301.7724.0529.37

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
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • wpsms_settings
    • wpsms_show_welcome_page
    • widget_recent-posts
    • db_upgraded
    • wpsms_first_show_welcome_page
    • can_compress_scripts
    • widget_wpsms_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-sms-vatansms-com/includes/templates/admin-newsletter.php
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sms-vatansms-com/includes/admin/welcome/welcome.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sms-vatansms-com/includes/admin/subscribers/subscribers.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sms-vatansms-com/includes/admin/send/send-sms.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sms-vatansms-com/includes/admin/outbox/outbox.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms-vatansms-com/includes/gateways/class-wpsms-gateway-vatansms.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-sms-vatansms-com/includes/templates/widget.php:2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-sms-vatansms-com/includes/admin/class-wpsms-admin.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sms-vatansms-com/includes/templates/meta-box.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Option' not found in wp-content/plugins/wp-sms-vatansms-com/includes/admin/class-wpsms-admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-sms-vatansms-com/includes/templates/subscribe-form.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Screen shot 1), #2 (Screen shot 2), #3 (Screen shot 3)
The official readme.txt is a good inspiration

wp-sms-vatansms-com/vatansms-wp-sms.php 77% from 13 tests

The principal PHP file in "VatanSMS WP SMS" v. 1.01 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("https://vatansms.com/")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-sms-vatansms-com.php" instead of "vatansms-wp-sms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin15,886 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP642,3754,28013,104
CSS8103461,209
JSON100998
JavaScript113751575

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity35.45
▷ Minimum class complexity1.00
▷ Maximum class complexity389.00
Average method complexity4.95
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes66
▷ Abstract classes11.52%
▷ Concrete classes6598.48%
▷ Final classes00.00%
Methods573
▷ Static methods498.55%
▷ Public methods52491.45%
▷ Protected methods406.98%
▷ Private methods91.57%
Functions17
▷ Named functions1270.59%
▷ Anonymous functions529.41%
Constants70
▷ Global constants6795.71%
▷ Class constants34.29%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/favicon.png2.94KB1.98KB▼ 32.61%
assets/css/chosen-sprite.png0.53KB0.88KB0.00%
assets/images/vatansms-logo.png14.54KB4.21KB▼ 71.03%
assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%