79% lws-sms

Code Review | LWS SMS

WordPress plugin LWS SMS scored 79% from 54 tests.

About plugin

  • Plugin page: lws-sms
  • Plugin version: 2.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Jul 27, 2022
  • Latest release: Aug 10, 2023
  • Number of updates: 23
  • Update frequency: every 16.7 days
  • Top authors: aurelienlws (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active / 5,663 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▲0.25ms] Passed 4 tests

A check of server-side resources used by LWS SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2942.42 ▲1.13
Dashboard /wp-admin3.59 ▲0.2946.61 ▼3.46
Posts /wp-admin/edit.php3.70 ▲0.3547.94 ▲0.81
Add New Post /wp-admin/post-new.php6.17 ▲0.29100.87 ▲2.50
Media Library /wp-admin/upload.php3.51 ▲0.2945.35 ▲12.27

Server storage [IO: ▲0.89MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 94 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for LWS SMS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲9513.64 ▼0.761.64 ▼0.0638.93 ▼5.40
Dashboard /wp-admin2,237 ▲494.94 ▼0.14108.97 ▼1.9082.62 ▲38.68
Posts /wp-admin/edit.php2,120 ▲282.01 ▲0.0036.78 ▲0.4534.73 ▲2.88
Add New Post /wp-admin/post-new.php1,694 ▲16122.36 ▼0.79673.47 ▼13.1148.82 ▼3.26
Media Library /wp-admin/upload.php1,407 ▲224.17 ▼0.07100.65 ▼77.1574.63 ▲11.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/lws-sms/php/select_country_code.php
    • > /wp-content/plugins/lws-sms/php/select_country.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-sms/view/general.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-sms/view/templates.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-sms/view/plugins.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-sms/view/automatisation.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-sms/view/client_page.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lws-sms/view/campaign.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lws-sms/view/tabs.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-sms/view/welcome.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/lws-sms/view/alert/apikey_wrong.php:2
    • > PHP Notice
      Undefined variable: is_sms_active in wp-content/plugins/lws-sms/view/client_page.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
3 plugin tags: woocommerce, sms, lws

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

"LWS SMS" version 2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
105 characters long description:
With LWS SMS, create SMS Templates and configurate your website to send SMS to clients when you want it !

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
Everything looks great! No dangerous files found in this plugin8,471 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
PHP203732664,241
CSS5304941,859
SVG40439907
PO File1254301533
HTML2120478
JSON100241
JavaScript2622212

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.40
▷ Minimum class complexity4.00
▷ Maximum class complexity26.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods19
▷ Static methods1473.68%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions3594.59%
▷ Anonymous functions25.41%
Constants8
▷ Global constants8100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo_lws.png7.05KB3.16KB▼ 55.23%