89% text-to-share

Code Review | Text To Share

WordPress plugin Text To Share scored89%from 54 tests.

About plugin

  • Plugin page: text-to-share
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2013
  • Latest release: Mar 9, 2015
  • Number of updates: 21
  • Update frequency: every 24.7 days
  • Top authors: webdisrupt (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /3,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Text To Share
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.07 ▼10.07
Dashboard /wp-admin3.31 ▲0.0144.52 ▼3.09
Posts /wp-admin/edit.php3.36 ▲0.0148.43 ▲4.95
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.52 ▼6.85
Media Library /wp-admin/upload.php3.24 ▲0.0129.75 ▼5.58

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Text To Share
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.191.66 ▼0.0938.11 ▼9.28
Dashboard /wp-admin2,209 ▲184.87 ▼0.14106.27 ▼3.1042.61 ▼2.09
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0835.99 ▲1.3331.21 ▼1.34
Add New Post /wp-admin/post-new.php1,519 ▲523.41 ▲5.99651.08 ▼59.1854.67 ▼3.14
Media Library /wp-admin/upload.php1,385 ▼04.33 ▲0.0999.69 ▼3.3845.46 ▲0.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === text-to-share === )
The official readme.txt is a good inspiration

text-to-share/text-to-share.php Passed 13 tests

The primary PHP file in "Text To Share" version 0.5.1 is used by WordPress to initiate all plugin functionality
74 characters long description:
A plugin that allows a piece of text to be shared across social platforms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin121 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33460110
CSS10011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods1680.00%
▷ Protected methods00.00%
▷ Private methods420.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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
trunk/img/twitter.png3.72KB1.34KB▼ 63.88%
img/closing-quote.png0.76KB0.38KB▼ 49.48%
trunk/img/closing-quote.png0.76KB0.38KB▼ 49.48%
img/facebook.png3.62KB1.20KB▼ 66.72%
img/icon.png0.16KB0.17KB0.00%