84% woocommerce-plivo

Code Review | WooCommerce Plivo SMS notifications

WordPress plugin WooCommerce Plivo SMS notifications scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-plivo
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.6
  • WordPress version: 6.3.1
  • First release: Jul 25, 2014
  • Latest release: Nov 21, 2016
  • Number of updates: 22
  • Update frequency: every 38.6 days
  • Top authors: siteoptimo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,708 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.92ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Plivo SMS notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.70 ▼4.34
Dashboard /wp-admin3.33 ▲0.0352.73 ▼4.26
Posts /wp-admin/edit.php3.44 ▲0.0951.76 ▼3.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.99 ▼15.62
Media Library /wp-admin/upload.php3.25 ▲0.0237.80 ▲3.24

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Plivo SMS notifications
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.47 ▲0.472.04 ▲0.2443.26 ▲0.12
Dashboard /wp-admin2,206 ▲154.85 ▼1.04112.69 ▲8.8540.95 ▼4.19
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0336.46 ▼7.3833.52 ▼1.76
Add New Post /wp-admin/post-new.php1,533 ▲423.24 ▲5.03692.71 ▲74.6156.96 ▲1.34
Media Library /wp-admin/upload.php1,388 ▼34.22 ▼0.0193.79 ▼9.9642.86 ▼5.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(HTTP/Request2/SocketWrapper.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/SOCKS5.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'HTTP/Request2/Exception.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/MultipartBody.php on line 22
    • > PHP Warning
      require_once(HTTP/Request2.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/CookieJar.php on line 22
    • > PHP Warning
      require_once(HTTP/Request2.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/plivo/plivo.php on line 2
    • > PHP Warning
      require_once(HTTP/Request2/Response.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/Adapter.php on line 24
    • > PHP Warning
      require_once(HTTP/Request2/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/Response.php on line 24
    • > PHP Warning
      require_once(Net/URL2.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2.php on line 24
    • > PHP Fatal error
      require_once(): Failed opening required 'HTTP/Request2/SocketWrapper.php' (include_path='.:/usr/share/php') in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/SOCKS5.php on line 22
    • > PHP Warning
      require_once(PEAR/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/Exception.php on line 24
    • > PHP Warning
      require_once(HTTP/Request2/Exception.php): failed to open stream: No such file or directory in wp-content/plugins/woocommerce-plivo/library/HTTP/Request2/MultipartBody.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: support, plivo, status, update, notifications...

woocommerce-plivo/woocommerce-plivo.php Passed 13 tests

The main file in "WooCommerce Plivo SMS notifications" v. 2.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
87 characters long description:
Send SMS update notifications to your customers with this Plivo plugin for WooCommerce.

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
Success! There were no dangerous files found in this plugin5,063 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP298693,1784,826
PO File13946123
JavaScript2151365
Markdown118049

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity18.33
▷ Minimum class complexity1.00
▷ Maximum class complexity199.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes12.08%
▷ Concrete classes4797.92%
▷ Final classes12.13%
Methods357
▷ Static methods298.12%
▷ Public methods29582.63%
▷ Protected methods3810.64%
▷ Private methods246.72%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants31
▷ Global constants00.00%
▷ Class constants31100.00%
▷ Public constants31100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ok.png0.48KB0.35KB▼ 26.99%
assets/images/fail.png0.52KB0.35KB▼ 32.14%