72% recent-tweets-widget

Code Review | Recent Tweets Widget

WordPress plugin Recent Tweets Widget scored72%from 54 tests.

About plugin

  • Plugin page: recent-tweets-widget
  • Plugin version: 1.6.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-6.0
  • WordPress version: 6.3.1
  • First release: Mar 9, 2013
  • Latest release: Aug 1, 2022
  • Number of updates: 41
  • Update frequency: every 83.7 days
  • Top authors: grimmdude (60.98%)ThemePrince (34.15%)marnietave (9.76%)

Code review

54 tests

User reviews

29 reviews

Install metrics

80,000+ active /1,972,640 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.30ms] Passed 4 tests

An overview of server-side resources used by Recent Tweets Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0841.04 ▼0.90
Dashboard /wp-admin3.39 ▲0.0848.40 ▼1.72
Posts /wp-admin/edit.php3.50 ▲0.1553.07 ▲0.86
Add New Post /wp-admin/post-new.php5.97 ▲0.0898.22 ▲6.32
Media Library /wp-admin/upload.php3.31 ▲0.0835.34 ▲0.54
Recent Tweets /wp-admin/admin.php?page=recent-tweets3.2933.78
AppSumo /wp-admin/admin.php?page=recent_tweets_go_appsumo_pro3.1127.17
Other Tools /wp-admin/admin.php?page=recent-tweets-plugin-other-tools3.2830.73

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

Browser metrics Passed 4 tests

Checking browser requirements for Recent Tweets Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.08 ▼0.201.86 ▲0.2930.89 ▼17.94
Dashboard /wp-admin2,233 ▲565.59 ▲0.0084.02 ▼6.0041.22 ▼3.88
Posts /wp-admin/edit.php2,141 ▲411.98 ▼0.0541.47 ▲4.7337.60 ▼3.48
Add New Post /wp-admin/post-new.php1,566 ▲3824.87 ▲1.50627.39 ▲12.0070.52 ▲23.45
Media Library /wp-admin/upload.php1,438 ▲384.24 ▲0.18101.55 ▼2.1647.67 ▲0.76
Recent Tweets /wp-admin/admin.php?page=recent-tweets9722.0423.5952.01
AppSumo /wp-admin/admin.php?page=recent_tweets_go_appsumo_pro1,34814.15568.74162.45
Other Tools /wp-admin/admin.php?page=recent-tweets-plugin-other-tools1,0102.0126.5540.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_tp_widget_recent_tweets
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/recent-tweets-widget/appsumo-capture-form.php
    • > /wp-content/plugins/recent-tweets-widget/recent-tweets.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recent-tweets-widget/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/recent-tweets-widget/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/recent-tweets-widget/other_tools.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/recent-tweets-widget/other_plugins.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=recent_tweets_go_appsumo_pro
    • > Network (severe)
    https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=recent_tweets - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=recent_tweets_go_appsumo_pro
    • > Javascript (severe) in unknown
    https://appsumo2-cdn.appsumo.com/static/dist/js/vue_bridge.61ea1a9c.js 6:75186 Uncaught TypeError: (void 0) is not a function
    • > GET request to /wp-admin/admin.php?page=recent_tweets_go_appsumo_pro
    • > Console-api (warning) in unknown
    https://accounts.google.com/gsi/client 41:457 "[GSI_LOGGER]: Relative login_uri was provided. Use absolute url instead. Relative login_uri may be considered invalid in the future."

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: cache, recent tweets, tweets, social media, twitter api v11...

recent-tweets-widget/recent-tweets.php 85% from 13 tests

The principal PHP file in "Recent Tweets Widget" v. 1.6.8 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 322 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("recent-tweets-widget.php" instead of "recent-tweets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,551 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP82773641,016
CSS33810344
SVG302104
PO File1313180
JavaScript1007

PHP code Passed 2 tests

Analyzing 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.31
Average class complexity8.77
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods81
▷ Static methods1012.35%
▷ Public methods7086.42%
▷ Protected methods22.47%
▷ Private methods911.11%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.22MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png12.40KB8.62KB▼ 30.46%
assets/screenshot-1.png60.91KB34.65KB▼ 43.10%
assets/screenshot-2.png42.32KB16.22KB▼ 61.67%
assets/icon-256x256.png35.59KB26.00KB▼ 26.96%
assets/banner-772x250.png63.24KB28.90KB▼ 54.30%