10% latest-tweets-widget

Code Review | Latest Tweets Widget

WordPress plugin Latest Tweets Widget scored 10% from 54 tests.

About plugin

  • Plugin page: latest-tweets-widget
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.5.3
  • WordPress version: 5.8.1
  • First release: Feb 26, 2013
  • Latest release: Aug 2, 2016
  • Number of updates: 86
  • Update frequency: every 14.6 days
  • Top authors: timwhitlock (100%)

Code review

54 tests

User reviews

33 reviews

Install metrics

10,000+ active / 215,692 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/latest-tweets-widget/api/lib/twitter-api-core.php+62
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.73MB] [CPU: ▼198.15ms] Passed 4 tests

Server-side resources used by Latest Tweets Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0742.07 ▲4.05
Dashboard /wp-admin1.92 ▼1.136.68 ▼48.18
Posts /wp-admin/edit.php1.92 ▼1.197.37 ▼42.54
Add New Post /wp-admin/post-new.php1.92 ▼3.517.88 ▼669.56
Media Library /wp-admin/upload.php1.92 ▼1.086.30 ▼32.33
Twitter API /wp-admin/options-general.php?page=twitter-api-admin1.926.16

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 1 new option
New WordPress options
widget_latest_tweets_widget

Browser metrics Passed 4 tests

Checking browser requirements for Latest Tweets Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.85 ▲0.219.37 ▼3.4050.96 ▲4.05
Dashboard /wp-admin2,997 ▲635.94 ▼0.15142.93 ▼16.20113.94 ▼3.91
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0172.73 ▼4.7991.68 ▼2.09
Add New Post /wp-admin/post-new.php1,607 ▼818.79 ▼2.11394.71 ▲52.59117.54 ▲6.18
Media Library /wp-admin/upload.php1,812 ▲55.04 ▼0.01167.63 ▼32.79122.93 ▼6.70
Twitter API /wp-admin/options-general.php?page=twitter-api-admin1,1032.0961.2285.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/latest-tweets-widget/api/lib/twitter-api-core.php+62
    Array and string offset access syntax with curly braces is deprecated
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_latest_tweets_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitter-api-admin
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/latest-tweets-widget/api/lib/twitter-api-core.php+80
    Array and string offset access syntax with curly braces is deprecated

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/latest-tweets-widget/api/test/utils/EmojiTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/latest-tweets-widget/api/test/utils/HtmlTest.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/latest-tweets-widget/api/twitter-api.php:147
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/latest-tweets-widget/api/lang/extra/twitter-errors.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/latest-tweets-widget/api/lib/twitter-api-admin.php:196
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/latest-tweets-widget/api/test/utils/UnicodeTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/latest-tweets-widget/latest-tweets.php:191

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === latest-tweets-widget === )
Please take inspiration from this readme.txt

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

This is the main PHP file of "Latest Tweets Widget" version 1.1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("latest-tweets-widget.php" instead of "latest-tweets.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected3,453 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP123334752,108
PO File104654751,159
Markdown241097
XML22054
Bourne Shell211635

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods54
▷ Static methods59.26%
▷ Public methods4990.74%
▷ Protected methods00.00%
▷ Private methods59.26%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin