72% order-message-notification

Code Review | Order Message Notification

WordPress plugin Order Message Notification scored72%from 54 tests.

About plugin

  • Plugin page: order-message-not...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.4-5.4
  • WordPress version: 6.3.1
  • First release: May 12, 2020
  • Latest release: May 19, 2020
  • Number of updates: 32
  • Update frequency: every 0.2 days
  • Top authors: desparza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /903 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.89ms] Passed 4 tests

This is a short check of server-side resources used by Order Message Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.33 ▼2.30
Dashboard /wp-admin3.36 ▲0.0546.60 ▼2.04
Posts /wp-admin/edit.php3.47 ▲0.1148.56 ▲4.36
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.48 ▼10.58
Media Library /wp-admin/upload.php3.28 ▲0.0533.64 ▼0.62
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu3.2531.40
Order Message Notification /wp-admin/admin.php?page=dewp-omn-admin-settings3.2230.88

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Order Message Notification
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.33 ▼1.044.44 ▲2.7041.00 ▼6.42
Dashboard /wp-admin2,231 ▲434.85 ▼1.02107.07 ▼10.1852.04 ▲4.56
Posts /wp-admin/edit.php2,114 ▲252.02 ▲0.0539.81 ▲5.7037.79 ▲0.29
Add New Post /wp-admin/post-new.php1,558 ▲2518.39 ▲0.01623.08 ▲2.8361.43 ▲11.36
Media Library /wp-admin/upload.php1,410 ▲224.20 ▼0.0394.73 ▼0.3444.13 ▲1.09
Sobre Daniel Esparza /wp-admin/admin.php?page=desparza-menu8022.0323.5628.82
Order Message Notification /wp-admin/admin.php?page=dewp-omn-admin-settings9092.0624.7727.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for 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-omn-admin-settings
    • > Notice in wp-content/plugins/order-message-notification/includes/order-message-notification-admin.php+128
    Trying to access array offset on value of type bool

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/order-message-notification/order-message-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-message-notification/includes/twilio-php-master/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapItemInstance.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Version' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Voice/V1.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/IpMessaging/V2/Service/Channel/InviteOptions.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Video/V1/CompositionHookOptions.php:85
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Preview/Understand/Assistant/Task/FieldPage.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Chat/V2/Service/ChannelList.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Studio/V2/Flow/Execution/ExecutionStep/ExecutionStepContextPage.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueue/TaskQueueStatisticsList.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Api/V2010/Account/AddressOptions.php:59
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/order-message-notification/includes/twilio-php-master/src/Twilio/Rest/Serverless/V1/Service/TwilioFunction/FunctionVersionContext.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Requires php: Invalid version format
The official readme.txt might help

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

The primary PHP file in "Order Message Notification" version 1.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 237 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected82,977 lines of code in 1,756 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,74824,21199,30482,824
Markdown225079
JSON10035
XML10011
CSS21210
JavaScript10010
Dockerfile1308

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.28
▷ Minimum class complexity1.00
▷ Maximum class complexity50.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,831
▷ Static methods4794.05%
▷ Public methods10,64489.97%
▷ Protected methods1,1799.97%
▷ Private methods80.07%
Functions104
▷ Named functions109.62%
▷ Anonymous functions9490.38%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin