84% twitter-tweets

Code Review | Customize Feeds for Twitter

WordPress plugin Customize Feeds for Twitter scored84%from 54 tests.

About plugin

  • Plugin page: twitter-tweets
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.4
  • WordPress version: 6.3.1
  • First release: May 22, 2014
  • Latest release: Nov 4, 2023
  • Number of updates: 82
  • Update frequency: every 42.1 days
  • Top authors: weblizar (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

8,000+ active /374,368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.67ms] Passed 4 tests

This is a short check of server-side resources used by Customize Feeds for Twitter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.23 ▲3.05
Dashboard /wp-admin3.32 ▲0.0245.09 ▼5.39
Posts /wp-admin/edit.php3.37 ▲0.0247.64 ▲0.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.59 ▼12.84
Media Library /wp-admin/upload.php3.24 ▲0.0234.89 ▲2.89

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 123 new files
Database: no new tables, 7 new options
New WordPress options
widget_weblizar_twitter
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Customize Feeds for Twitter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲21014.12 ▼0.0635.50 ▲33.8545.02 ▲1.86
Dashboard /wp-admin2,208 ▲285.61 ▼0.0392.16 ▲4.5340.36 ▼0.00
Posts /wp-admin/edit.php2,116 ▲162.03 ▲0.0739.85 ▼1.1636.22 ▲0.95
Add New Post /wp-admin/post-new.php1,539 ▲1323.21 ▼0.33641.04 ▼56.4449.99 ▼3.56
Media Library /wp-admin/upload.php1,416 ▲194.24 ▲0.0297.81 ▼16.8041.11 ▼7.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_weblizar_twitter
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/AbstractSignatureMethodTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-tweets/twitter_tweets_widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/src/TwitterOAuth.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/src/HmacSha1.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/Util/JsonDecoderTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/TokenTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/ConsumerTest.php:7
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Tests\\AbstractSignatureMethodTest' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/HmacSha1Test.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitter-tweets/vendor_old/abraham/twitteroauth/tests/TwitterOAuthTest.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
6 plugin tags: tweets, twitter, twitter wordpress plugin, twitter widget, twitter feed...

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

The main PHP script in "Customize Feeds for Twitter" version 2.2.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)

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
Everything looks great! No dangerous files found in this plugin16,966 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,777
PHP607932,1304,666
JavaScript619261,336
CSS58931951
PO File2335417684
JSON500352
Markdown6630147
XML22123
YAML10017
Bourne Shell14013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes39
▷ Abstract classes37.69%
▷ Concrete classes3692.31%
▷ Final classes00.00%
Methods310
▷ Static methods7323.55%
▷ Public methods25281.29%
▷ Protected methods61.94%
▷ Private methods5216.77%
Functions23
▷ Named functions1356.52%
▷ Anonymous functions1043.48%
Constants16
▷ Global constants1062.50%
▷ Class constants637.50%
▷ Public constants350.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin