78% inline-tweet-sharer

Code Review | Inline Tweet Sharer - Twitter Sharing Plugin

WordPress plugin Inline Tweet Sharer - Twitter Sharing Plugin scored78%from 54 tests.

About plugin

  • Plugin page: inline-tweet-sharer
  • Plugin version: 2.6.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.4
  • WordPress version: 6.3.1
  • First release: Aug 27, 2013
  • Latest release: Oct 26, 2023
  • Number of updates: 74
  • Update frequency: every 50.2 days
  • Top authors: rhyswynne (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

700+ active /34,011 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.09MB] [CPU: ▲0.29ms] Passed 4 tests

An overview of server-side resources used by Inline Tweet Sharer - Twitter Sharing Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0837.36 ▲1.51
Dashboard /wp-admin3.40 ▲0.0945.01 ▼3.36
Posts /wp-admin/edit.php3.45 ▲0.0946.12 ▲0.30
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.25 ▲3.04
Media Library /wp-admin/upload.php3.32 ▲0.0935.77 ▲2.70
Inline Tweet Sharer /wp-admin/options-general.php?page=inlinetweetshareroptions3.2936.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Inline Tweet Sharer - Twitter Sharing Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.71 ▼0.677.96 ▲6.4237.90 ▼4.20
Dashboard /wp-admin2,201 ▲245.55 ▼0.0281.55 ▼7.4438.29 ▼3.01
Posts /wp-admin/edit.php2,106 ▲241.97 ▼0.0639.09 ▲2.9137.22 ▼0.02
Add New Post /wp-admin/post-new.php1,531 ▲523.44 ▼0.27655.50 ▼39.8554.40 ▲3.03
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0294.06 ▼8.6839.66 ▼3.15
Inline Tweet Sharer /wp-admin/options-general.php?page=inlinetweetshareroptions1,4915.33140.1372.10

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'ITS_PATH/inc/tinymce.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 9
    • > PHP Warning
      Use of undefined constant ITS_PATH - assumed 'ITS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 8
    • > PHP Warning
      include_once(): Failed opening 'ITS_PATH/inc/enqueue.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 5
    • > PHP Warning
      include_once(ITS_PATH/inc/tinymce.php): failed to open stream: No such file or directory in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 9
    • > PHP Warning
      Use of undefined constant ITS_PATH - assumed 'ITS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 5
    • > PHP Warning
      include_once(): Failed opening 'ITS_PATH/inc/bitly4.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/inline-tweet-sharer/inline-tweet-sharer.php:14
    • > PHP Warning
      include_once(): Failed opening 'ITS_PATH/inc/options.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 8
    • > PHP Warning
      include_once(ITS_PATH/inc/options.php): failed to open stream: No such file or directory in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 8
    • > PHP Warning
      include_once(ITS_PATH/inc/enqueue.php): failed to open stream: No such file or directory in wp-content/plugins/inline-tweet-sharer/inc/core.php on line 5

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=inlinetweetshareroptions
    • > Javascript (severe) in unknown
    https://button.buffer.com/button/?id=e82540703bd477cd&url=https%3A%2F%2Fwww.winwar.co.uk%2Fplugins%2Finline-tweet-sharer%2F&text=Just%20been%20using%20Inline%20Tweet%20Sharer%20%23WordPress%20plugin&via=rhyswynne&count=horizontal&placement=button&utm_source=http%3A%2F%2Fwp.com%2Fwp-admin%2Foptions-general.php%3Fpage%3Dinlinetweetshareroptions&utm_medium=buffer_button&utm_campaign=buffer 15:647 Uncaught TypeError: Cannot set properties of null (setting 'onclick')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: gutenberg ready, social media promotion, social media marketing, tweet, twitter...

inline-tweet-sharer/inline-tweet-sharer.php 92% from 13 tests

The main file in "Inline Tweet Sharer - Twitter Sharing Plugin" v. 2.6.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,333 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP91816361,045
CSS2283170
PO File1141471
JavaScript33412947

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions48100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
twitter.png0.64KB0.55KB▼ 14.26%
twitter-bg.png0.42KB0.37KB▼ 12.24%
twitter-bg-hover.png0.53KB0.43KB▼ 19.85%