10% wp-twitter-profile-widget

Code Review | Twitter profile widget

WordPress plugin Twitter profile widget scored10%from 54 tests.

About plugin

  • Plugin page: wp-twitter-profil...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Jun 30, 2016
  • Latest release: Feb 9, 2017
  • Number of updates: 15
  • Update frequency: every 14.9 days
  • Top authors: f13dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,396 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/wp-twitter-profile-widget/wp-twitter-profile.php+15
    Function create_function() is deprecated

Server metrics [RAM: ▼2.19MB] [CPU: ▼67.37ms] Passed 4 tests

Analyzing server-side resources used by Twitter profile widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.644.94 ▼39.69
Dashboard /wp-admin2.11 ▼1.525.23 ▼62.26
Posts /wp-admin/edit.php2.11 ▼1.575.27 ▼64.78
Add New Post /wp-admin/post-new.php2.11 ▼4.046.53 ▼102.75
Media Library /wp-admin/upload.php2.11 ▼1.385.71 ▼32.76

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_wp_twitter_profile_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twitter profile widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.34 ▲0.111.57 ▼0.2939.55 ▼3.31
Dashboard /wp-admin2,198 ▲215.59 ▼0.0793.57 ▲8.4340.49 ▼6.69
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0139.82 ▼2.3836.15 ▼3.29
Add New Post /wp-admin/post-new.php1,545 ▲1923.22 ▲5.73572.40 ▼107.2450.36 ▼17.46
Media Library /wp-admin/upload.php1,397 ▼04.23 ▲0.00102.03 ▼3.4143.74 ▼3.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-twitter-profile-widget/wp-twitter-profile.php+15
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_wp_twitter_profile_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: consumer_key_secret in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 10
    • > PHP Notice
      Undefined variable: access_token in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 7
    • > PHP Notice
      Undefined variable: twitter_count in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-twitter-profile-widget/wp-twitter-profile.php:15
    • > PHP Notice
      Undefined variable: twitter_timeout in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 38
    • > PHP Notice
      Undefined variable: twitter_id in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 64
    • > PHP Notice
      Undefined variable: access_token_secret in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 8
    • > PHP Notice
      Undefined variable: consumer_key in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 9
    • > PHP Notice
      Undefined variable: twitter_count in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 36
    • > PHP Notice
      Undefined variable: twitter_id in wp-content/plugins/wp-twitter-profile-widget/twitter.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The WP Twitter profile widget, showing a Twitter profile only, without any tweets.), #2 (The WP Twitter profile widget, showing a Twitter profile with the two most recent tweets.), #3 (The WP Twitter profile widget, showing a Twitter profile with only the most recent tweet, which also has an image attached which is displayed as a link to the tweet.)
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-twitter-profile-widget === )
Please take inspiration from this readme.txt

wp-twitter-profile-widget/wp-twitter-profile.php 92% from 13 tests

"Twitter profile widget" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-twitter-profile-widget.php" instead of "wp-twitter-profile.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected724 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3102213504
CSS1290176
Markdown212044

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.00
▷ Minimum class complexity12.00
▷ Maximum class complexity30.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1275.00%
▷ Protected methods00.00%
▷ Private methods425.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 1.00MB with 0.55MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png355.23KB192.85KB▼ 45.71%
screenshot-1.png315.73KB159.17KB▼ 49.59%
screenshot-2.png350.27KB109.69KB▼ 68.68%