72% powerful-sms

Code Review | Powerful SMS

WordPress plugin Powerful SMS scored72%from 54 tests.

About plugin

  • Plugin page: powerful-sms
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Jul 18, 2022
  • Latest release: Jul 18, 2022
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: felipe152 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /155 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼3.48MB] [CPU: ▼718,196.20ms] Passed 4 tests

This is a short check of server-side resources used by Powerful SMS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1643.75 ▲2.54
Dashboard /wp-admin3.51 ▼14.4250.45 ▼2,872,779.21
Posts /wp-admin/edit.php3.63 ▲0.2350.49 ▲0.59
Add New Post /wp-admin/post-new.php6.11 ▲0.1892.59 ▼8.72
Media Library /wp-admin/upload.php3.44 ▲0.1640.98 ▲5.72
Powerful SMS /wp-admin/admin.php?page=powerfulsms3.4035.04
Status de Pedido /wp-admin/admin.php?page=powerfulsms-status3.3831.04

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
recovery_mode_email_last_sent
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Powerful SMS
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.37 ▼0.271.78 ▼0.2744.11 ▲1.57
Dashboard /wp-admin2,220 ▲495.71 ▲0.1083.81 ▼27.8141.85 ▼11.88
Posts /wp-admin/edit.php2,131 ▲282.02 ▲0.0534.70 ▼4.4940.08 ▲2.82
Add New Post /wp-admin/post-new.php1,553 ▲1623.22 ▲5.09649.92 ▼11.4657.47 ▼18.41
Media Library /wp-admin/upload.php1,431 ▲314.25 ▲0.07111.99 ▼0.4347.95 ▲4.66
Powerful SMS /wp-admin/admin.php?page=powerfulsms8341.9027.7029.14
Status de Pedido /wp-admin/admin.php?page=powerfulsms-status7081.126.5320.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=powerfulsms-status
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=powerfulsms-status
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
    • > GET request to /wp-admin/admin.php?page=powerfulsms-status
    • > Error in wp-content/plugins/powerful-sms/includes/add-ons/class-powerful-sms-wp-woocommerce.php+103
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/powerful-sms/includes/add-ons/class-powerful-sms-wp-woocommerce.php:103
    Stack trace:
    #0 wp-content/plugins/powerful-sms/includes/add-ons/class-powerful-sms-wp-woocommerce.php(77): Powerful_Sms_Wp_Woocommerce->load_custom_status()
    #1 wp-content/plugins/powerful-sms/includes/add-ons/class-powerful-sms-wp-woocommerce.php(64): Powerful_Sms_Wp_Woocommerce->load_triggers()
    #2 wp-content/plugins/powerful-sms/admin/class-powerful-sms-wp-admin.php(145): Powerful_Sms_Wp_Woocommerce->__construct()
    #3 wp-includes/class-wp-hook.php(310): Powerful_Sms_Wp_Admin->view_status_order()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/powerful-sms/public/partials/powerful-sms-wp-public-display.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: triggers in wp-content/plugins/powerful-sms/admin/partials/powerful-sms-wp-admin-status-order.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/powerful-sms/admin/partials/powerful-sms-wp-admin-config.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/powerful-sms/admin/partials/powerful-sms-wp-admin-status-order.php:56
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/powerful-sms/admin/partials/powerful-sms-wp-admin-status-order.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Contributors: Plugin contributors not specified
  • Plugin Name: Please specify the plugin name on the first line ( === powerful-sms === )
You can take inspiration from this readme.txt

powerful-sms/powerful-sms-wp.php 85% from 13 tests

This is the main PHP file of "Powerful SMS" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("powerful-sms.php" instead of "powerful-sms-wp.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,718 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP15190554933
CSS35913770
JavaScript242715

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity16.67
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods49
▷ Static methods918.37%
▷ Public methods4387.76%
▷ Protected methods00.00%
▷ Private methods612.24%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants2
▷ Global constants2100.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
There are no PNG files in this plugin