83% sms-sharing-button-for-jetpack

Code Review | SMS Sharing Button for Jetpack

WordPress plugin SMS Sharing Button for Jetpack scored 83% from 54 tests.

About plugin

  • Plugin page: sms-sharing-butto...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Sep 24, 2015
  • Latest release: Oct 9, 2015
  • Number of updates: 5
  • Update frequency: every 4.0 days
  • Top authors: valeriosza (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,547 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by SMS Sharing Button for Jetpack
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.44 ▼3.18
Dashboard /wp-admin3.31 ▲0.0050.11 ▲1.07
Posts /wp-admin/edit.php3.36 ▲0.0048.50 ▼6.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0098.25 ▼10.98
Media Library /wp-admin/upload.php3.23 ▲0.0037.48 ▲3.70

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for SMS Sharing Button for Jetpack
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼0.961.65 ▲0.0639.47 ▲0.13
Dashboard /wp-admin2,206 ▲154.85 ▼0.12110.36 ▲8.7741.84 ▲2.57
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0745.54 ▲8.4641.41 ▲7.66
Add New Post /wp-admin/post-new.php1,533 ▼1023.44 ▲5.31601.83 ▼2.3457.75 ▼0.91
Media Library /wp-admin/upload.php1,388 ▼04.20 ▲0.0392.85 ▼1.9341.69 ▲0.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/sms-sharing-button-for-jetpack/jetpack-sms.php
    • > /wp-content/plugins/sms-sharing-button-for-jetpack/includes/class.sms-source.php
    • > /wp-content/plugins/sms-sharing-button-for-jetpack/includes/class.sms-service.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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 require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

sms-sharing-button-for-jetpack/jetpack-sms.php 85% from 13 tests

The main PHP script in "SMS Sharing Button for Jetpack" version 1.1.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sms-sharing-button-for-jetpack.php" instead of "jetpack-sms.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin369 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP35222217
CSS111881
PO File2182370
JavaScript1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.33
▷ Minimum class complexity4.00
▷ Maximum class complexity13.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods418.18%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
10 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/rectangle-en@2x.png3.18KB1.30KB▼ 58.99%
assets/images/shape.png2.10KB1.37KB▼ 34.65%
assets/images/rectangle-ja.png2.22KB0.88KB▼ 60.25%
assets/images/rectangle-en.png2.22KB0.88KB▼ 60.25%
assets/images/shape-white@2x.png2.47KB1.87KB▼ 24.51%