83% twitter-feed-afo

Code Review | Recent Tweet Widget AFO

WordPress plugin Recent Tweet Widget AFO scored 83% from 54 tests.

About plugin

  • Plugin page: twitter-feed-afo
  • Plugin version: 2.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-5.9.3
  • WordPress version: 6.3.1
  • First release: May 1, 2014
  • Latest release: May 14, 2022
  • Number of updates: 63
  • Update frequency: every 46.6 days
  • Top authors: avi.megladon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 7,360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.49ms] Passed 4 tests

A check of server-side resources used by Recent Tweet Widget AFO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.54 ▼0.62
Dashboard /wp-admin3.39 ▲0.0948.82 ▼2.18
Posts /wp-admin/edit.php3.44 ▲0.0943.40 ▼4.65
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.91 ▼17.43
Media Library /wp-admin/upload.php3.25 ▲0.0333.79 ▼1.68
Twitter Widget Settings /wp-admin/options-general.php?page=tweet_widget_afo_menu3.2734.02

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Recent Tweet Widget AFO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.29 ▼1.091.77 ▼0.0243.40 ▼0.79
Dashboard /wp-admin2,215 ▲305.84 ▲0.05106.73 ▲2.9142.61 ▼0.22
Posts /wp-admin/edit.php2,095 ▲92.01 ▼0.0132.43 ▼2.8533.93 ▲0.75
Add New Post /wp-admin/post-new.php1,533 ▼923.41 ▲0.61662.33 ▲18.5246.28 ▼5.28
Media Library /wp-admin/upload.php1,391 ▲64.21 ▼0.0092.44 ▼10.7641.14 ▼6.59
Twitter Widget Settings /wp-admin/options-general.php?page=tweet_widget_afo_menu1,0022.0224.0632.47

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/twitter-feed-afo/view/admin/help-support.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/twitter-feed-afo/view/admin/settings.php:3
    • > PHP Notice
      Undefined variable: tweets in wp-content/plugins/twitter-feed-afo/view/frontend/widget.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/twitter-feed-afo/view/admin/donate.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-feed-afo/tweet-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-feed-afo/tweet-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/twitter-feed-afo/view/frontend/widget.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can look at the official readme.txt

twitter-feed-afo/twitter-feed.php 85% from 13 tests

"Recent Tweet Widget AFO" version 2.2.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("twitter-feed-afo.php" instead of "twitter-feed.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 169 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,034 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13203321971
CSS25245
PO File18018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.18
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes211.76%
▷ Concrete classes1588.24%
▷ Final classes00.00%
Methods95
▷ Static methods1010.53%
▷ Public methods8387.37%
▷ Protected methods22.11%
▷ Private methods1010.53%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/paypal.png0.77KB0.80KB0.00%
images/rss.png0.60KB0.50KB▼ 16.18%