77% orion-sms-otp-verification

Code Review | Orion SMS OTP Verification

WordPress plugin Orion SMS OTP Verification scored77%from 54 tests.

About plugin

  • Plugin page: orion-sms-otp-ver...
  • Plugin version: 1.1.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Apr 6, 2018
  • Latest release: Dec 25, 2020
  • Number of updates: 48
  • Update frequency: every 20.7 days
  • Top authors: gsayed786 (100%)

Code review

54 tests

User reviews

119 reviews

Install metrics

700+ active /38,087 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼2.17ms] Passed 4 tests

An overview of server-side resources used by Orion SMS OTP Verification
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3539.63 ▼2.91
Dashboard /wp-admin3.64 ▲0.3444.67 ▼3.57
Posts /wp-admin/edit.php3.75 ▲0.4046.40 ▼2.57
Add New Post /wp-admin/post-new.php6.23 ▲0.34111.02 ▲10.98
Media Library /wp-admin/upload.php3.56 ▲0.3435.79 ▲0.37
Orion OTP /wp-admin/admin.php?page=orion_settings_page3.6841.94
Woocommerce Settings /wp-admin/admin.php?page=ihs_otp_plugin_woocommerce_settings_page3.5547.17

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,362 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics 50% from 4 tests

An overview of browser requirements for Orion SMS OTP Verification
Please improve the following
  • Memory: Total browser memory usage should be limited to 75.00MB (currently 100.68MB on /wp-admin/admin.php?page=ihs_otp_plugin_woocommerce_settings_page)
  • Script duration: JavaScript execution time must be kept under 1,500.00ms (currently 2,524.25ms on /wp-admin/admin.php?page=ihs_otp_plugin_woocommerce_settings_page)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲23113.94 ▼0.499.47 ▲7.7239.12 ▼0.16
Dashboard /wp-admin2,233 ▲454.85 ▼0.03106.14 ▼0.5442.07 ▲5.52
Posts /wp-admin/edit.php2,113 ▲242.00 ▲0.0139.77 ▲3.7435.02 ▲2.46
Add New Post /wp-admin/post-new.php1,564 ▲3618.29 ▲0.02595.88 ▼17.1459.64 ▼0.39
Media Library /wp-admin/upload.php1,418 ▲304.14 ▼0.0694.16 ▲0.7241.09 ▼1.11
Orion OTP /wp-admin/admin.php?page=orion_settings_page11,724100.462,463.27199.75
Woocommerce Settings /wp-admin/admin.php?page=ihs_otp_plugin_woocommerce_settings_page8,759100.682,524.2592.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1313× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueRealTimeStatisticsContext.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Chat/V2/ServiceList.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Verify/V1/Service/VerificationOptions.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Trunking/V1/TrunkInstance.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Api/V2010/Account/Sip/Domain/CredentialListMappingList.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Preview/BulkExports/ExportContext.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionList.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Verify/V1/Service/VerificationInstance.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Sync/V1/Service/SyncStreamOptions.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/orion-sms-otp-verification/vendor/twilio-php-master/Twilio/Rest/Taskrouter/V1/Workspace/Workflow/WorkflowStatisticsContext.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ihs_otp_plugin_woocommerce_settings_page
    • > Network (severe)
    https://www.orionhive.com/static/latest-offers.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=orion_settings_page
    • > Network (severe)
    https://www.orionhive.com/static/login-with-sms.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=ihs_otp_plugin_woocommerce_settings_page
    • > Network (severe)
    https://www.orionhive.com/static/pricing.jpg - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=ihs_otp_plugin_woocommerce_settings_page
    • > Network (severe)
    https://www.orionhive.com/static/icon.jpg - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in orion-sms-otp-verification/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt might help

orion-sms-otp-verification/orion-sms-otp-verification.php 85% from 13 tests

Analyzing the main PHP file in "Orion SMS OTP Verification" version 1.1.7
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 158 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected72,329 lines of code in 1,358 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,34818,96576,78070,894
CSS213116635
JavaScript3112158512
XML300253
JSON10026
Dockerfile1309

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.69
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces146
Interfaces2
Traits0
Classes1,676
▷ Abstract classes19611.69%
▷ Concrete classes1,48088.31%
▷ Final classes00.00%
Methods9,163
▷ Static methods3553.87%
▷ Public methods8,24890.01%
▷ Protected methods9109.93%
▷ Private methods50.05%
Functions115
▷ Named functions3126.96%
▷ Anonymous functions8473.04%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin