84% woo-smsgateway

Code Review | Woo SMS Gateway

WordPress plugin Woo SMS Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woo-smsgateway
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Jun 5, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: hamzarauf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.55ms] Passed 4 tests

This is a short check of server-side resources used by Woo SMS Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.14 ▲0.08
Dashboard /wp-admin3.34 ▲0.0448.92 ▼0.78
Posts /wp-admin/edit.php3.39 ▲0.0349.42 ▼2.69
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.93 ▼9.17
Media Library /wp-admin/upload.php3.26 ▲0.0335.78 ▼1.55
Woo SMS Gateway /wp-admin/admin.php?page=woo-smsgateway-admin3.2335.11
Help /wp-admin/admin.php?page=woo-smsgateway-help3.2332.68

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Woo SMS Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.63 ▼0.721.70 ▼0.0444.05 ▼3.70
Dashboard /wp-admin2,229 ▲475.83 ▼0.06101.15 ▼10.3539.81 ▼0.97
Posts /wp-admin/edit.php2,112 ▲202.03 ▲0.0232.74 ▼6.8536.61 ▼0.83
Add New Post /wp-admin/post-new.php1,552 ▲2423.10 ▲4.79690.45 ▲16.9955.43 ▼2.68
Media Library /wp-admin/upload.php1,411 ▲234.18 ▼0.0696.32 ▼11.1544.13 ▲0.78
Woo SMS Gateway /wp-admin/admin.php?page=woo-smsgateway-admin8582.0221.9430.61
Help /wp-admin/admin.php?page=woo-smsgateway-help8392.0627.1141.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/SearchOrderByTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/ErrorResponseTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/ErrorTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/MessageLogTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/SearchTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/DeviceAttributesTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/CallbackSearchResultTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/CreateCallbackRequestTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/MessageTest.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/woo-smsgateway/smsGateway/lib/Swagger/Client/Tests/SendMessageRequestTest.php:46

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

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: sms, free, woocommerce, notifications, smsgateway

woo-smsgateway/wo-smsgateway.php 85% from 13 tests

The primary PHP file in "Woo SMS Gateway" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-smsgateway.php" instead of "wo-smsgateway.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "4.4")

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
Success! There were no dangerous files found in this plugin4,929 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP611,5645,6944,896
JSON10033

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.18
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes57
▷ Abstract classes00.00%
▷ Concrete classes57100.00%
▷ Final classes00.00%
Methods582
▷ Static methods14725.26%
▷ Public methods58199.83%
▷ Protected methods10.17%
▷ Private methods00.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.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
There are no PNG files in this plugin