83% notifylk-sms-for-woocommerce

Code Review | Notify.lk SMS for WooCommerce

WordPress plugin Notify.lk SMS for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: notifylk-sms-for-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Jan 29, 2021
  • Latest release: Jan 29, 2021
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: notifylk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /795 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.39ms] Passed 4 tests

Server-side resources used by Notify.lk SMS for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.16 ▼8.16
Dashboard /wp-admin3.37 ▲0.0651.92 ▼1.96
Posts /wp-admin/edit.php3.48 ▲0.1355.51 ▲3.82
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.12 ▼9.45
Media Library /wp-admin/upload.php3.29 ▲0.0640.20 ▲2.01

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/notifylk-sms-for-woocommerce/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Notify.lk SMS for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.24 ▼1.141.66 ▼0.3043.59 ▲0.25
Dashboard /wp-admin2,224 ▲245.86 ▲0.0098.90 ▼9.5339.08 ▼4.53
Posts /wp-admin/edit.php2,100 ▲32.03 ▼0.0537.74 ▲0.3937.48 ▲2.29
Add New Post /wp-admin/post-new.php1,545 ▲1923.21 ▲5.80631.15 ▲3.2266.40 ▲14.21
Media Library /wp-admin/upload.php1,400 ▲34.17 ▼0.0696.75 ▼3.1542.71 ▼1.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/notifylk-sms-for-woocommerce/includes/NotifyLKTrigger.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: notifylk, sri lanka, woocommerce, woocommerce sms, notify sms...

notifylk-sms-for-woocommerce/notifylk-woocommerce.php 85% from 13 tests

The principal PHP file in "Notify.lk SMS for WooCommerce" v. 1.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("notifylk-sms-for-woocommerce.php" instead of "notifylk-woocommerce.php")

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
There were no executable files found in this plugin947 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11210888947

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity19.14
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods71
▷ Static methods79.86%
▷ Public methods6794.37%
▷ Protected methods11.41%
▷ Private methods34.23%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin