10% twitter-feed-widget

Code Review | Twitter Feed Widget

WordPress plugin Twitter Feed Widget scored10%from 54 tests.

About plugin

  • Plugin page: twitter-feed-widget
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Apr 16, 2014
  • Number of updates: 14
  • Update frequency: every 34.4 days
  • Top authors: xavierserranoa (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /7,494 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/twitter-feed-widget/twitter-feed-widget.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; TSMTwitterFeedWidget has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼49.83ms] Passed 4 tests

Analyzing server-side resources used by Twitter Feed Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.335.04 ▼30.76
Dashboard /wp-admin2.16 ▼1.155.62 ▼40.80
Posts /wp-admin/edit.php2.16 ▼1.205.70 ▼42.14
Add New Post /wp-admin/post-new.php2.16 ▼3.735.76 ▼85.62
Media Library /wp-admin/upload.php2.16 ▼1.076.68 ▼28.58

Server storage [IO: ▲0.11MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_tsm-twitter-feed-widget
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Twitter Feed Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11313.78 ▼0.877.63 ▲6.0343.19 ▲0.84
Dashboard /wp-admin2,200 ▲195.59 ▼0.1285.02 ▼16.5536.90 ▼1.82
Posts /wp-admin/edit.php2,102 ▲21.98 ▼0.0435.99 ▼3.4732.14 ▼2.64
Add New Post /wp-admin/post-new.php1,530 ▲423.06 ▼0.39599.66 ▼12.3764.10 ▲8.65
Media Library /wp-admin/upload.php1,402 ▲24.22 ▲0.0495.25 ▼1.5841.02 ▼3.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/twitter-feed-widget/twitter-feed-widget.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; TSMTwitterFeedWidget has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_tsm-twitter-feed-widget
    • widget_theysaidso_widget
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-feed-widget/twitter-feed-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Example screenshot), #2 (Example screenshot), #3 (Example screenshot)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === twitter-feed-widget === )
You can look at the official readme.txt

twitter-feed-widget/twitter-feed-widget.php 92% from 13 tests

"Twitter Feed Widget" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 404 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected359 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP249113343
CSS10116

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity12.00
▷ Minimum class complexity5.00
▷ Maximum class complexity19.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png19.49KB5.46KB▼ 72.00%
screenshot-2.png26.62KB7.59KB▼ 71.48%
screenshot-3.png12.12KB3.18KB▼ 73.78%