84% good-old-twitter-feed-widget

Code Review | Good Old Twitter Feed Widget

WordPress plugin Good Old Twitter Feed Widget scored84%from 54 tests.

About plugin

  • Plugin page: good-old-twitter-...
  • Plugin version: 1.2.6
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Oct 26, 2022
  • Number of updates: 31
  • Update frequency: every 91.8 days
  • Top authors: whiletrue (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /25,212 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.62ms] Passed 4 tests

This is a short check of server-side resources used by Good Old Twitter Feed Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.69 ▲4.04
Dashboard /wp-admin3.33 ▼0.0144.75 ▼16.34
Posts /wp-admin/edit.php3.38 ▲0.0345.38 ▼1.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.87 ▼21.87
Media Library /wp-admin/upload.php3.26 ▲0.0336.03 ▲1.12

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_goodoldtwitterwidget
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Good Old Twitter Feed Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.52 ▼0.102.11 ▲0.5543.09 ▲1.72
Dashboard /wp-admin2,192 ▲115.51 ▼0.1983.66 ▼20.5839.14 ▼6.11
Posts /wp-admin/edit.php2,097 ▼32.09 ▲0.1135.41 ▼8.0833.16 ▼1.07
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▼0.30639.07 ▼37.1050.47 ▼19.13
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.02105.15 ▲4.2846.89 ▲4.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_goodoldtwitterwidget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Codebird' not found in wp-content/plugins/good-old-twitter-feed-widget/lib/class-wp-codebird.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/good-old-twitter-feed-widget/good_old_twitter_widget.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

good-old-twitter-feed-widget/good_old_twitter_widget.php 92% from 13 tests

The main PHP script in "Good Old Twitter Feed Widget" version 1.2.6 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("good-old-twitter-feed-widget.php" instead of "good_old_twitter_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,803 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP51874121,304
PO File7191195499

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity79.00
▷ Minimum class complexity41.00
▷ Maximum class complexity132.00
Average method complexity7.88
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods1852.94%
▷ Protected methods411.76%
▷ Private methods1235.29%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
twitter_small.png3.13KB0.69KB▼ 78.04%
assets/banner-772x250.png125.50KB42.43KB▼ 66.19%
assets/screenshot-2.png5.97KB4.10KB▼ 31.41%
assets/screenshot-1.png18.05KB8.21KB▼ 54.52%