83% sendtosms-sharing-button-for-jetpack

Code Review | SendToSMS Sharing Button for Jetpack

WordPress plugin SendToSMS Sharing Button for Jetpack scored83%from 54 tests.

About plugin

  • Plugin page: sendtosms-sharing...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2015
  • Latest release: Sep 30, 2015
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: vandezuma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /986 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
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.74ms] Passed 4 tests

An overview of server-side resources used by SendToSMS Sharing Button for Jetpack
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0626.39 ▼9.90
Dashboard /wp-admin3.32 ▼0.0248.49 ▼11.15
Posts /wp-admin/edit.php3.37 ▲0.0244.23 ▼17.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.66 ▼4.89
Media Library /wp-admin/upload.php3.24 ▲0.0239.51 ▲5.83

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for SendToSMS Sharing Button for Jetpack
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,454 ▼30714.11 ▼0.030.53 ▼1.1418.74 ▼22.30
Dashboard /wp-admin2,195 ▲175.55 ▼0.10107.17 ▲4.7046.82 ▲3.29
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0438.31 ▼4.8532.92 ▼12.20
Add New Post /wp-admin/post-new.php1,529 ▲322.66 ▼0.98632.92 ▼58.1571.21 ▲14.08
Media Library /wp-admin/upload.php1,397 ▼04.14 ▼0.07128.86 ▲28.3755.37 ▲10.16

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/sendtosms-sharing-button-for-jetpack/jetpack-sendtosms.php
    • > /wp-content/plugins/sendtosms-sharing-button-for-jetpack/includes/class.sendtosms-service.php
    • > /wp-content/plugins/sendtosms-sharing-button-for-jetpack/includes/class.sendtosms-source.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Donate link: Invalid URI ("")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (SendToSMS button shown as an available option in the Jetpack sharing module.), #2 (The SendToSMS button alongside other share buttons in a post.)
You can take inspiration from this readme.txt

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

"SendToSMS Sharing Button for Jetpack" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sendtosms-sharing-button-for-jetpack.php" instead of "jetpack-sendtosms.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 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin213 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP34113169
CSS17844

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods1688.89%
▷ Protected methods00.00%
▷ Private methods211.11%
Functions0
▷ Named functions00.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
7 PNG files occupy 0.13MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/shape@2x.png1.14KB1.31KB0.00%
assets/images/SMSIcon_share.png12.78KB5.35KB▼ 58.12%
assets/images/shape.png0.63KB0.78KB0.00%
assets/images/SMSIcon_share_sm_gray.png3.41KB1.59KB▼ 53.26%
assets/images/SMSIcon_share_sm_white.png3.70KB2.14KB▼ 42.04%