10% twitter-profile-widget

Code Review | Twitter Profile Widget

WordPress plugin Twitter Profile Widget scored 10% from 54 tests.

About plugin

  • Plugin page: twitter-profile-w...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.2
  • WordPress version: 6.3.1
  • First release: Jul 9, 2010
  • Latest release: Jul 7, 2011
  • Number of updates: 60
  • Update frequency: every 8.9 days
  • Top authors: nemooon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,775 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/twitter-profile-widget/twitter_profile_widget.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; TwitterProfileWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼54.98ms] Passed 4 tests

This is a short check of server-side resources used by Twitter Profile Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.53 ▼42.28
Dashboard /wp-admin2.09 ▼1.215.72 ▼46.61
Posts /wp-admin/edit.php2.10 ▼1.265.94 ▼40.54
Add New Post /wp-admin/post-new.php2.09 ▼3.796.51 ▼90.49
Media Library /wp-admin/upload.php2.10 ▼1.136.33 ▼32.10

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_twitterprofilewidget
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twitter Profile Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.33 ▼1.281.65 ▼0.2943.56 ▼1.03
Dashboard /wp-admin2,205 ▲235.79 ▼0.1396.34 ▼22.4138.36 ▼7.33
Posts /wp-admin/edit.php2,088 ▼12.00 ▼0.0137.10 ▲2.5434.09 ▼0.15
Add New Post /wp-admin/post-new.php1,516 ▼2617.75 ▼5.59682.60 ▲16.7869.11 ▲13.97
Media Library /wp-admin/upload.php1,390 ▲54.22 ▼0.04103.17 ▼1.7246.29 ▲1.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/twitter-profile-widget/twitter_profile_widget.php+15
    Methods with the same name as their class will not be constructors in a future version of PHP; TwitterProfileWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_twitterprofilewidget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/twitter-profile-widget/twitter_profile_widget.php:11
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/twitter-profile-widget/twitter_profile_widget.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (screenshot)
You can take inspiration from this readme.txt

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

The primary PHP file in "Twitter Profile Widget" version 0.9 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("twitter-profile-widget.php" instead of "twitter_profile_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin216 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP198121
JavaScript10059
CSS14036

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.79KB15.79KB▼ 59.30%