10% shopp-twilio

Code Review | Shopp + Twilio

WordPress plugin Shopp + Twilio scored10%from 54 tests.

About plugin

  • Plugin page: shopp-twilio
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 13, 2012
  • Latest release: Aug 25, 2014
  • Number of updates: 8
  • Update frequency: every 100.4 days
  • Top authors: lorenzocaum (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,577 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/shopp-twilio/shopp-twilio.php+50
    Accessing static property Shopp_Twilio::$accountsid as non static

Server metrics [RAM: ▼1.87MB] [CPU: ▼57.85ms] Passed 4 tests

Server-side resources used by Shopp + Twilio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.346.62 ▼34.26
Dashboard /wp-admin2.14 ▼1.207.31 ▼57.70
Posts /wp-admin/edit.php2.14 ▼1.217.24 ▼44.28
Add New Post /wp-admin/post-new.php2.14 ▼3.747.25 ▼95.16
Media Library /wp-admin/upload.php2.14 ▼1.096.11 ▼29.78

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Shopp + Twilio
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.26 ▼1.092.11 ▲0.2743.35 ▼0.80
Dashboard /wp-admin2,226 ▲235.86 ▲0.9596.62 ▼8.0642.36 ▼2.03
Posts /wp-admin/edit.php2,102 ▲22.05 ▲0.0334.80 ▼6.8732.23 ▼5.58
Add New Post /wp-admin/post-new.php1,542 ▲1623.16 ▲5.74618.46 ▼63.7648.47 ▼3.60
Media Library /wp-admin/upload.php1,402 ▲114.24 ▲0.0195.23 ▼7.2444.37 ▼1.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/shopp-twilio/shopp-twilio.php+50
    Accessing static property Shopp_Twilio::$accountsid as non static
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 37× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/ConnectApp.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/Application.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/OutgoingCallerIds.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/Participants.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/AuthorizedConnectApps.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/AuthorizedConnectApp.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/Applications.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/ShortCode.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/shopp-twilio/inc/Services/Twilio/Rest/Account.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/shopp-twilio/shopp-twilio.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (The Shopp + Twilio WordPress admin page.2. An additional view of the Shopp + Twilio WordPress admin page.3. Shopp + Twilio iPhone 4S demo.) image required
You can take inspiration from this readme.txt

shopp-twilio/shopp-twilio.php Passed 13 tests

"Shopp + Twilio" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
130 characters long description:
Merchants who have a WordPress ecommerce store are notified of new orders via a text message to their mobile phone through Twilio.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/shopp-twilio/inc/Services/twilio_ssl_certificate.crt
1,503 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP472366581,490
CSS13013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.08
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes50
▷ Abstract classes36.00%
▷ Concrete classes4794.00%
▷ Final classes00.00%
Methods118
▷ Static methods1311.02%
▷ Public methods10689.83%
▷ Protected methods86.78%
▷ Private methods43.39%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.40MB with 0.27MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png163.27KB58.22KB▼ 64.34%
screenshot-3.png125.05KB38.65KB▼ 69.09%
screenshot-2.png118.91KB38.81KB▼ 67.36%