84% websms-ru-woocommerce

Code Review | WEBSMS.RU WooCommerce

WordPress plugin WEBSMS.RU WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: websms-ru-woocomm...
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: Mar 10, 2021
  • Number of updates: 3
  • Update frequency: every 449.4 days
  • Top authors: elafonisy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.02ms] Passed 4 tests

Analyzing server-side resources used by WEBSMS.RU WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.45 ▼0.65
Dashboard /wp-admin3.31 ▲0.0045.53 ▲1.47
Posts /wp-admin/edit.php3.36 ▲0.0044.66 ▼4.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.31 ▼8.44
Media Library /wp-admin/upload.php3.23 ▲0.0033.26 ▼2.75

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WEBSMS.RU WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.24 ▼1.341.81 ▲0.1743.76 ▲3.66
Dashboard /wp-admin2,206 ▲154.87 ▼0.06107.66 ▲4.8042.88 ▲2.93
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0539.77 ▼0.2434.53 ▼1.71
Add New Post /wp-admin/post-new.php1,531 ▲323.39 ▲5.30664.27 ▲35.2851.35 ▼3.30
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0193.73 ▼14.0241.13 ▼2.63

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/websms-ru-woocommerce/websms_woocommerce.php

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: sms, woocommerce, websms, sms notification

websms-ru-woocommerce/websms_woocommerce.php 92% from 13 tests

The main file in "WEBSMS.RU WooCommerce" v. 1.00 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("websms-ru-woocommerce.php" instead of "websms_woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected430 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23044430

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity41.00
▷ Minimum class complexity32.00
▷ Maximum class complexity50.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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_websms.png7.99KB3.90KB▼ 51.14%