83% twitter-widget-pro

Code Review | Twitter Widget Pro

WordPress plugin Twitter Widget Pro scored83%from 54 tests.

About plugin

  • Plugin page: twitter-widget-pro
  • Plugin version: 2.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Apr 17, 2008
  • Latest release: Nov 29, 2017
  • Number of updates: 179
  • Update frequency: every 19.6 days
  • Top authors: aaroncampbell (100%)

Code review

54 tests

User reviews

66 reviews

Install metrics

8,000+ active /1,121,665 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼2.41ms] 75% from 4 tests

This is a short check of server-side resources used by Twitter Widget Pro
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,936.44ms on /wp-admin/options-general.php?page=twitterWidgetPro)
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4540.07 ▼3.98
Dashboard /wp-admin3.75 ▲0.4448.86 ▼3.95
Posts /wp-admin/edit.php3.80 ▲0.4452.87 ▲11.82
Add New Post /wp-admin/post-new.php6.26 ▲0.3885.72 ▼7.19
Media Library /wp-admin/upload.php3.61 ▲0.3838.77 ▲5.48
Twitter Widget /wp-admin/options-general.php?page=twitterWidgetPro4.711,936.44

Server storage [IO: ▲0.22MB] [DB: ▲0.03MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_twitter
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Twitter Widget Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.39 ▲0.041.52 ▼0.2337.45 ▼9.30
Dashboard /wp-admin2,205 ▲285.53 ▼0.0689.43 ▼14.9037.57 ▼4.80
Posts /wp-admin/edit.php2,116 ▲161.97 ▼0.0134.34 ▼3.0933.85 ▲2.86
Add New Post /wp-admin/post-new.php1,553 ▲1818.33 ▲0.12632.84 ▼24.5976.87 ▲9.76
Media Library /wp-admin/upload.php1,419 ▲194.31 ▲0.1194.12 ▼8.3341.18 ▼0.99
Twitter Widget /wp-admin/options-general.php?page=twitterWidgetPro1,6234.9152.1257.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_twitter
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 fix the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-widget-pro/class.wp_widget_twitter_pro.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitter-widget-pro/tlc-transients.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitter-widget-pro/tlc-transients.php:6

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: feed, widget, twitter

twitter-widget-pro/wp-twitter-widget.php 85% from 13 tests

The main PHP script in "Twitter Widget Pro" version 2.9.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("twitter-widget-pro.php" instead of "wp-twitter-widget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 161 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
Everything looks great! No dangerous files found in this plugin2,783 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP52553191,701
PO File74275551,082

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity41.83
▷ Minimum class complexity6.00
▷ Maximum class complexity162.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods103
▷ Static methods87.77%
▷ Public methods7673.79%
▷ Protected methods65.83%
▷ Private methods2120.39%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected