84% autoshare-for-twitter

Code Review | Autoshare for Twitter

WordPress plugin Autoshare for Twitter scored84%from 54 tests.

About plugin

  • Plugin page: autoshare-for-twi...
  • Plugin version: 2.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Jan 16, 2020
  • Latest release: Aug 22, 2023
  • Number of updates: 24
  • Update frequency: every 55.8 days
  • Top authors: 10up (41.67%)johnwatkins0 (37.5%)10upbot (29.17%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active /9,312 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.81MB] [CPU: ▲0.70ms] Passed 4 tests

Server-side resources used by Autoshare for Twitter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.28 ▲0.8242.61 ▼3.17
Dashboard /wp-admin4.13 ▲0.7848.75 ▼10.08
Posts /wp-admin/edit.php4.19 ▲0.8351.72 ▲7.82
Add New Post /wp-admin/post-new.php6.75 ▲0.86114.39 ▲13.04
Media Library /wp-admin/upload.php4.06 ▲0.8241.08 ▲8.23
Autoshare for Twitter /wp-admin/options-general.php?page=autoshare-for-twitter4.0335.82

Server storage [IO: ▲0.55MB] [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: 56 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
autoshare_migrate_to_v2_api_notice_dismissed
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
autoshare_liveurl
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Autoshare for Twitter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.29 ▼0.991.64 ▼0.7640.76 ▼3.60
Dashboard /wp-admin2,214 ▲265.85 ▲0.9397.97 ▼16.4640.05 ▼2.71
Posts /wp-admin/edit.php2,137 ▲482.03 ▲0.0438.37 ▲1.7835.42 ▲2.12
Add New Post /wp-admin/post-new.php1,523 ▲923.08 ▲5.46645.26 ▼36.7953.61 ▲0.09
Media Library /wp-admin/upload.php1,396 ▲144.28 ▲0.0497.52 ▲0.4140.26 ▼0.06
Autoshare for Twitter /wp-admin/options-general.php?page=autoshare-for-twitter1,1222.2326.6937.94

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 detected upon uninstall: 8 options
    • autoshare_migrate_to_v2_api_notice_dismissed
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • autoshare_liveurl

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/autoshare-for-twitter/includes/class-twitter-accounts-list-table.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TenUp\\AutoshareForTwitter\\Core\\Post_Meta\\add_action() in wp-content/plugins/autoshare-for-twitter/includes/admin/post-meta.php:619
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TenUp\\AutoshareForTwitter\\Core\\Admin\\add_action() in wp-content/plugins/autoshare-for-twitter/includes/admin/settings.php:478
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TenUp\\AutoshareForTwitter\\Core\\add_action() in wp-content/plugins/autoshare-for-twitter/includes/core.php:61
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TenUp\\AutoshareForTwitter\\Core\\Post_Transition\\add_action() in wp-content/plugins/autoshare-for-twitter/includes/admin/post-transition.php:328
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/autoshare-for-twitter/vendor/abraham/twitteroauth/src/HmacSha1.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/autoshare-for-twitter/vendor/abraham/twitteroauth/src/TwitterOAuth.php:27
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/autoshare-for-twitter/includes/class-twitter-accounts-list-table.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/autoshare-for-twitter/includes/class-twitter-accounts-list-table.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: autoshare, social media, auto share, twitter, auto-share...

autoshare-for-twitter/autoshare-for-twitter.php Passed 13 tests

This is the main PHP file of "Autoshare for Twitter" version 2.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
77 characters long description:
Automatically tweets the post title or custom message and a link to the post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected4,699 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP358322,3303,946
CSS2701304
JavaScript53542267
JSON100151
SVG70031

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.19
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces16
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods183
▷ Static methods4725.68%
▷ Public methods15484.15%
▷ Protected methods21.09%
▷ Private methods2714.75%
Functions89
▷ Named functions7685.39%
▷ Anonymous functions1314.61%
Constants41
▷ Global constants512.20%
▷ Class constants3687.80%
▷ Public constants3391.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin