84% free-sms-for-woocommerce

Code Review | Free SMS for WooCommerce

WordPress plugin Free SMS for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: free-sms-for-wooc...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2020
  • Latest release: Sep 21, 2023
  • Number of updates: 11
  • Update frequency: every 94.9 days
  • Top authors: bjuriewicz (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /1,932 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.11ms] Passed 4 tests

This is a short check of server-side resources used by Free SMS for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.07 ▲1.60
Dashboard /wp-admin3.31 ▲0.0147.87 ▼8.07
Posts /wp-admin/edit.php3.36 ▲0.0151.00 ▲2.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.57 ▼8.29
Media Library /wp-admin/upload.php3.24 ▲0.0141.04 ▲5.00

Server storage [IO: ▲18.32MB] [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: 1,508 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
smsfwc_settings
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Free SMS for WooCommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6613.56 ▼1.031.60 ▼0.1239.45 ▼6.74
Dashboard /wp-admin2,215 ▲275.83 ▼0.03104.09 ▼2.1339.07 ▼2.62
Posts /wp-admin/edit.php2,104 ▲151.99 ▼0.0739.35 ▲0.9235.25 ▲0.52
Add New Post /wp-admin/post-new.php1,548 ▲1523.05 ▼0.47684.40 ▼19.4753.41 ▼11.36
Media Library /wp-admin/upload.php1,397 ▲64.31 ▲0.11101.25 ▼8.3944.80 ▼0.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/free-sms-for-woocommerce/vendor/giggsey/libphonenumber-for-php/src/Leniency/Possible.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MetadataSourceInterface' not found in wp-content/plugins/free-sms-for-woocommerce/vendor/giggsey/libphonenumber-for-php/src/MultiFileMetadataSourceImpl.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/free-sms-for-woocommerce/vendor/giggsey/libphonenumber-for-php/src/Leniency/Valid.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/free-sms-for-woocommerce/vendor/giggsey/libphonenumber-for-php/src/Leniency/ExactGrouping.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MetadataLoaderInterface' not found in wp-content/plugins/free-sms-for-woocommerce/vendor/giggsey/libphonenumber-for-php/src/DefaultMetadataLoader.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/free-sms-for-woocommerce/vendor/giggsey/libphonenumber-for-php/src/Leniency/StrictGrouping.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MatcherAPIInterface' not found in wp-content/plugins/free-sms-for-woocommerce/vendor/giggsey/libphonenumber-for-php/src/RegexBasedMatcher.php:10
    • > PHP Parse error
      syntax error, unexpected 'endif' (T_ENDIF) in wp-content/plugins/free-sms-for-woocommerce/page.php on line 193
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/free-sms-for-woocommerce/index.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
3 plugin tags: sms, notifications, woocommerce

free-sms-for-woocommerce/index.php 92% from 13 tests

Analyzing the main PHP file in "Free SMS for WooCommerce" version 1.0.0
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("free-sms-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin593,007 lines of code in 1,370 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,3603,26616,911590,796
JavaScript25051861,630
JSON510375
Markdown3860206

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity22.91
▷ Minimum class complexity1.00
▷ Maximum class complexity366.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces7
Interfaces3
Traits0
Classes43
▷ Abstract classes12.33%
▷ Concrete classes4297.67%
▷ Final classes12.38%
Methods527
▷ Static methods11221.25%
▷ Public methods43081.59%
▷ Protected methods6913.09%
▷ Private methods285.31%
Functions60
▷ Named functions5591.67%
▷ Anonymous functions58.33%
Constants124
▷ Global constants32.42%
▷ Class constants12197.58%
▷ Public constants121100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/logo_withBG.png12.64KB4.90KB▼ 61.24%
img/arrow.png4.50KB2.92KB▼ 34.96%