72% order-sms-notification

Code Review | Order SMS Notification

WordPress plugin Order SMS Notification scored72%from 54 tests.

About plugin

  • Plugin page: order-sms-notific...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.4-5.4
  • WordPress version: 6.3.1
  • First release: May 19, 2020
  • Latest release: May 19, 2020
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: desparza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /442 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by Order SMS Notification
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.83 ▼2.72
Dashboard /wp-admin3.31 ▼0.0349.18 ▼22.18
Posts /wp-admin/edit.php3.37 ▲0.0152.01 ▼5.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0198.55 ▼3.24
Media Library /wp-admin/upload.php3.24 ▲0.0140.13 ▲3.11
Order SMS Notification /wp-admin/admin.php?page=dewp-sms-admin-settings3.1832.94
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu3.2033.65

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Order SMS Notification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.011.92 ▲0.0742.46 ▼1.38
Dashboard /wp-admin2,223 ▲495.58 ▲0.0492.40 ▼6.0947.58 ▲7.24
Posts /wp-admin/edit.php2,125 ▲252.02 ▼0.0139.57 ▲0.8438.89 ▲4.17
Add New Post /wp-admin/post-new.php1,547 ▲1922.99 ▲0.07669.46 ▲26.1162.31 ▼1.18
Media Library /wp-admin/upload.php1,425 ▲284.21 ▲0.04101.12 ▼5.1545.94 ▲0.68
Order SMS Notification /wp-admin/admin.php?page=dewp-sms-admin-settings9382.1222.7730.41
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu8172.0025.4729.55

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • 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
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dewp-sms-admin-settings
    • > Notice in wp-content/plugins/order-sms-notification/includes/order-sms-notification-admin.php+128
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/order-sms-notification/order-sms-notification.php
  • 1716× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Api/V2010/Account/SipInstance.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Notify/V1/Service/NotificationPage.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Video/V1/CompositionHookList.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/IpMessaging/V1/Service/User/UserChannelList.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Pricing/V1/PhoneNumber/CountryList.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowCumulativeStatisticsContext.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Version' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Serverless/V1.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Taskrouter/V1/Workspace/Worker/WorkersRealTimeStatisticsOptions.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/IpMessaging/V1/CredentialContext.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/order-sms-notification/includes/twilio-php-master/src/Twilio/Rest/Notify/V1/CredentialContext.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Requires php: Invalid version format
You can take inspiration from this readme.txt

order-sms-notification/order-sms-notification.php 92% from 13 tests

The primary PHP file in "Order SMS Notification" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 223 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin83,003 lines of code in 1,756 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,74824,21799,32682,850
Markdown225079
JSON10035
XML10011
CSS21210
JavaScript10010
Dockerfile1308

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.28
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces184
Interfaces2
Traits0
Classes2,194
▷ Abstract classes25411.58%
▷ Concrete classes1,94088.42%
▷ Final classes20.10%
Methods11,834
▷ Static methods4784.04%
▷ Public methods10,64889.98%
▷ Protected methods1,1799.96%
▷ Private methods70.06%
Functions105
▷ Named functions1110.48%
▷ Anonymous functions9489.52%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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