83% wp-to-twitter

Code Review | XPoster - Share to Twitter/X from WordPress

WordPress plugin XPoster - Share to Twitter/X from WordPress scored83%from 54 tests.

About plugin

  • Plugin page: wp-to-twitter
  • Plugin version: 4.1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 1, 2008
  • Latest release: Nov 27, 2023
  • Number of updates: 583
  • Update frequency: every 9.4 days
  • Top authors: joedolson (100%)

Code review

54 tests

User reviews

66 reviews

Install metrics

20,000+ active /3,887,997 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲1.06MB] [CPU: ▲0.78ms] Passed 4 tests

Analyzing server-side resources used by XPoster - Share to Twitter/X from WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.56 ▲1.1047.69 ▲6.97
Dashboard /wp-admin4.40 ▲1.0952.19 ▲8.82
Posts /wp-admin/edit.php4.45 ▲1.0958.29 ▼1.33
Add New Post /wp-admin/post-new.php6.94 ▲1.0591.04 ▼11.35
Media Library /wp-admin/upload.php4.25 ▲1.0243.50 ▲9.68

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 381 new files
Database: no new tables, 27 new options
New WordPress options
db_upgraded
jd_twit_custom_url
newlink-published-text
wp_to_twitter_version
jd_twit_blogroll
jd_post_excerpt
use_dynamic_analytics
jd_shortener
jd_max_characters
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for XPoster - Share to Twitter/X from WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4314.25 ▼0.101.76 ▲0.1143.93 ▲3.84
Dashboard /wp-admin2,198 ▲185.58 ▼0.1093.83 ▲7.1679.45 ▲35.32
Posts /wp-admin/edit.php2,115 ▲121.96 ▲0.0235.08 ▼7.3529.99 ▼10.79
Add New Post /wp-admin/post-new.php6,359 ▲4,83326.11 ▲2.821,015.62 ▲434.8366.79 ▲16.17
Media Library /wp-admin/upload.php1,418 ▲184.23 ▲0.0397.80 ▲4.1763.73 ▲22.03

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • no-analytics
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 129× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/wp-to-twitter/vendor/guzzlehttp/promises/src/TaskQueue.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WpToTwitter_Vendor\oweh\\TwitterApi\\AbstractController' not found in wp-content/plugins/wp-to-twitter/vendor_prefixed/vendor/noweh/twitter-api-v2-php/src/TweetBookmarks.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/wp-to-twitter/vendor/abraham/twitteroauth/src/TwitterOAuth.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-to-twitter/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/wp-to-twitter/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'WpToTwitter_Vendor\\Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-to-twitter/vendor_prefixed/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WpToTwitter_Vendor\oweh\\TwitterApi\\AbstractController' not found in wp-content/plugins/wp-to-twitter/vendor_prefixed/vendor/noweh/twitter-api-v2-php/src/Timeline.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestFactoryInterface' not found in wp-content/plugins/wp-to-twitter/vendor/guzzlehttp/psr7/src/HttpFactory.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Noweh\\TwitterApi\\Test\\BaseTestCase' not found in wp-content/plugins/wp-to-twitter/vendor/noweh/twitter-api-v2-php/test/TweetsTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/wp-to-twitter/vendor/guzzlehttp/psr7/src/PumpStream.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

wp-to-twitter/wp-to-twitter.php 77% from 13 tests

"XPoster - Share to Twitter/X from WordPress" version 4.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 characters long)
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("lang")
  • Domain Path: Prefix the domain path with a forward slash character ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected34,948 lines of code in 350 files:
LanguageFilesBlank linesComment linesLines of code
PHP2993,64515,72227,386
Markdown221,56104,392
JSON16002,264
CSS21260587
JavaScript41018163
XML416478
YAML110042
reStructuredText26412036

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity12.57
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces30
Interfaces52
Traits6
Classes220
▷ Abstract classes62.73%
▷ Concrete classes21497.27%
▷ Final classes7032.71%
Methods1,923
▷ Static methods32516.90%
▷ Public methods1,57882.06%
▷ Protected methods422.18%
▷ Private methods30315.76%
Functions331
▷ Named functions14443.50%
▷ Anonymous functions18756.50%
Constants163
▷ Global constants106.13%
▷ Class constants15393.87%
▷ Public constants12481.05%

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 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png4.69KB2.54KB▼ 45.79%
images/logo-black.png0.34KB0.53KB0.00%
images/Error.png0.61KB0.50KB▼ 17.07%
images/image.png0.92KB1.05KB0.00%
images/logo-white.png0.38KB0.53KB0.00%