83% twitter-tools

Code Review | Tools for Twitter

WordPress plugin Tools for Twitter scored83%from 54 tests.

About plugin

  • Plugin page: twitter-tools
  • Plugin version: 3.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8
  • WordPress version: 6.3.1
  • First release: Mar 7, 2007
  • Latest release: Mar 2, 2020
  • Number of updates: 227
  • Update frequency: every 20.9 days
  • Top authors: alexkingorg (88.99%)crowdfavorite (11.45%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active /1,233,011 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.28MB] [CPU: ▼8.76ms] Passed 4 tests

A check of server-side resources used by Tools for Twitter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2839.78 ▼6.59
Dashboard /wp-admin3.65 ▲0.3052.74 ▼14.62
Posts /wp-admin/edit.php3.70 ▲0.3456.70 ▲3.75
Add New Post /wp-admin/post-new.php6.17 ▲0.2888.17 ▼17.59
Media Library /wp-admin/upload.php3.51 ▲0.2841.54 ▲4.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_aktt-widget
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Tools for Twitter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲2814.25 ▲0.132.26 ▲0.2940.36 ▼0.86
Dashboard /wp-admin2,208 ▲285.67 ▲0.0190.11 ▼7.2442.99 ▲1.86
Posts /wp-admin/edit.php2,111 ▲111.97 ▼0.0035.97 ▼1.3033.91 ▼0.25
Add New Post /wp-admin/post-new.php1,538 ▲1223.14 ▼0.42708.41 ▲6.8465.39 ▲4.70
Media Library /wp-admin/upload.php1,410 ▲104.24 ▲0.07113.53 ▲0.5947.64 ▲0.98

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_aktt-widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 items
  • 19× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wptexturize() in wp-content/plugins/twitter-tools/views/tweet.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-tools/widget.php:3
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/twitter-tools/views/tweet-list.php on line 4
    • > PHP Notice
      Undefined variable: account in wp-content/plugins/twitter-tools/views/admin-account.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/twitter-tools//classes/aktt.php' (include_path='.:/usr/share/php') in wp-content/plugins/twitter-tools/twitter-tools.php on line 38
    • > PHP Notice
      Undefined variable: tweets in wp-content/plugins/twitter-tools/views/tweet-list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitter-tools/classes/aktt_account.php:217
    • > PHP Notice
      Trying to get property 'id' of non-object in wp-content/plugins/twitter-tools/views/admin-account.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/twitter-tools/views/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/twitter-tools/views/tweet-list.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Show your tweets on your site (optional).), #2 (Tweets can be viewed by account, @mention or #hashtag.), #3 (Manage your tweets in the standard WordPress admin interface.), #4 (View tweets by @mention, #hashtag, etc.), #5 (Easy interface to for per-account settings.)
Please take inspiration from this readme.txt

twitter-tools/twitter-tools.php 92% from 13 tests

The principal PHP file in "Tools for Twitter" v. 3.2.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 196 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,208 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP112455522,208

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity60.50
▷ Minimum class complexity8.00
▷ Maximum class complexity138.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods93
▷ Static methods4649.46%
▷ Public methods93100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.65MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png94.14KB32.25KB▼ 65.74%
screenshot-2.png38.09KB11.25KB▼ 70.48%
screenshot-5.png130.59KB44.66KB▼ 65.80%
screenshot-1.png340.23KB103.05KB▼ 69.71%
assets/img/bg-clouds.png7.46KB6.98KB▼ 6.46%