78% turbo-sms

Code Review | Turbo SMS

WordPress plugin Turbo SMS scored78%from 54 tests.

About plugin

  • Plugin page: turbo-sms
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Jul 17, 2021
  • Latest release: Jul 24, 2021
  • Number of updates: 12
  • Update frequency: every 0.8 days
  • Top authors: turbosms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.53ms] Passed 4 tests

This is a short check of server-side resources used by Turbo SMS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.0443.12 ▼2.90
Dashboard /wp-admin3.62 ▲0.0549.42 ▼7.84
Posts /wp-admin/edit.php3.73 ▲0.0553.74 ▲1.97
Add New Post /wp-admin/post-new.php6.20 ▲0.05101.15 ▲3.89
Media Library /wp-admin/upload.php3.54 ▲0.0541.35 ▲2.64
Turbo SMS /wp-admin/options-general.php?page=turbo_sms3.4834.67

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Turbo SMS
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.34 ▼0.041.85 ▼0.1845.48 ▲2.68
Dashboard /wp-admin2,204 ▲245.64 ▲0.0790.81 ▼1.5036.88 ▼8.81
Posts /wp-admin/edit.php2,106 ▼02.04 ▼0.0039.89 ▲1.3836.05 ▲2.19
Add New Post /wp-admin/post-new.php1,531 ▲517.53 ▼0.18684.69 ▲4.0651.56 ▼5.68
Media Library /wp-admin/upload.php1,409 ▲94.23 ▲0.0198.87 ▼6.5145.65 ▼1.80
Turbo SMS /wp-admin/options-general.php?page=turbo_sms9732.0221.3253.30

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=turbo_sms
    • > Notice in wp-content/plugins/turbo-sms/admin.php+255
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/turbo-sms/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/turbo-sms/turbo-sms.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/turbo-sms/woocommerce.php:5

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (/assets/Plugin Interface.png), #2 (/assets/API KEY.png)
You can look at the official readme.txt

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

Analyzing the main PHP file in "Turbo SMS" version 2.0
63 characters long description:
Add Instant Order Status SMS Notifications Feature To Your Site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin390 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP59721285
CSS1180105

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.23MB with 0.16MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/API KEY.png109.46KB34.06KB▼ 68.88%
assets/Plugin Interface.png127.34KB39.49KB▼ 68.99%