84% sms-notification-contact-form-with-twilio

Code Review | Sms notification contact form with twilio

WordPress plugin Sms notification contact form with twilio scored84%from 54 tests.

About plugin

  • Plugin page: sms-notification-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: May 25, 2022
  • Latest release: Dec 20, 2022
  • Number of updates: 6
  • Update frequency: every 35.0 days
  • Top authors: hamidxazad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /565 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: ▼14.17ms] Passed 4 tests

Server-side resources used by Sms notification contact form with twilio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.72 ▼11.10
Dashboard /wp-admin3.31 ▲0.0147.29 ▼10.01
Posts /wp-admin/edit.php3.36 ▲0.0146.27 ▼12.85
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.99 ▼22.73
Media Library /wp-admin/upload.php3.23 ▲0.0137.48 ▼0.36

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2,222 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sms notification contact form with twilio
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8714.44 ▲0.071.89 ▼0.1138.88 ▼7.71
Dashboard /wp-admin2,214 ▲265.83 ▲0.95106.59 ▼10.0040.16 ▼3.81
Posts /wp-admin/edit.php2,096 ▲42.02 ▲0.0636.36 ▼5.5536.83 ▲2.58
Add New Post /wp-admin/post-new.php1,541 ▲823.21 ▲0.20649.85 ▼5.9855.05 ▼1.13
Media Library /wp-admin/upload.php1,390 ▲84.22 ▲0.0498.97 ▼14.4444.03 ▼3.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2150× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Recording/TranscriptionList.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationPage.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/ServiceOptions.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Video/V1/RoomOptions.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Sip/Domain/AuthTypesList.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Insights/V1/Call/EventInstance.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Trunking/V1/Trunk/OriginationUrlPage.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Preview/Understand/Assistant/Task/TaskStatisticsPage.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Api/V2010/Account/Conference/RecordingContext.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/sms-notification-contact-form-with-twilio/vendor/twilio/sdk/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionPage.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: sms, form, notification, contact form, contact...

sms-notification-contact-form-with-twilio/sms_notification_contact_form_twilio.php 92% from 13 tests

The main PHP file in "Sms notification contact form with twilio" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sms-notification-contact-form-with-twilio.php" instead of "sms_notification_contact_form_twilio.php")

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 detected105,807 lines of code in 2,218 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,20630,614125,442105,457
JSON300122
YAML3152108
Markdown225079
CSS11018
XML10011
Dockerfile1308
JavaScript1204

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.33
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces216
Interfaces2
Traits0
Classes2,721
▷ Abstract classes31211.47%
▷ Concrete classes2,40988.53%
▷ Final classes20.08%
Methods15,043
▷ Static methods5803.86%
▷ Public methods13,53489.97%
▷ Protected methods1,4999.96%
▷ Private methods100.07%
Functions127
▷ Named functions129.45%
▷ Anonymous functions11590.55%
Constants19
▷ Global constants526.32%
▷ Class constants1473.68%
▷ Public constants14100.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
PNG images were not found in this plugin