10% twitter-home-time-line

Code Review | Twitter Home Time line

WordPress plugin Twitter Home Time line scored10%from 54 tests.

About plugin

  • Plugin page: twitter-home-time...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 6.3.1
  • First release: Dec 3, 2012
  • Latest release: Dec 3, 2012
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: bhuwan81 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,830 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
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/twitter-home-time-line/twitter.php+141
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_TwitterHomeTimeline has a deprecated constructor

Server metrics [RAM: ▼1.90MB] [CPU: ▼51.80ms] Passed 4 tests

This is a short check of server-side resources used by Twitter Home Time line
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.388.66 ▼34.05
Dashboard /wp-admin2.10 ▼1.206.11 ▼43.49
Posts /wp-admin/edit.php2.10 ▼1.255.89 ▼39.12
Add New Post /wp-admin/post-new.php2.10 ▼3.785.84 ▼90.54
Media Library /wp-admin/upload.php2.10 ▼1.124.81 ▼25.18
Twitter Home Timeline Options /wp-admin/options-general.php?page=TwitterHomeTimeline2.105.25

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_twitter-home-timeline
widget_theysaidso_widget

Browser metrics Passed 4 tests

Twitter Home Time line: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.30 ▼1.294.77 ▲2.6642.26 ▼1.64
Dashboard /wp-admin2,204 ▲195.83 ▼0.0598.59 ▼4.2040.10 ▼0.74
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0538.80 ▼10.5436.90 ▼1.13
Add New Post /wp-admin/post-new.php1,545 ▲318.54 ▲0.23596.77 ▼26.9351.21 ▼4.96
Media Library /wp-admin/upload.php1,392 ▲44.28 ▲0.1195.63 ▼9.7743.49 ▼2.39
Twitter Home Timeline Options /wp-admin/options-general.php?page=TwitterHomeTimeline8012.0524.9126.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/twitter-home-time-line/twitter.php+141
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_TwitterHomeTimeline has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_twitter-home-timeline
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=TwitterHomeTimeline
    • > Deprecated in wp-content/plugins/twitter-home-time-line/twitter.php+141
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_Widget_TwitterHomeTimeline has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=TwitterHomeTimeline
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Widget_TwitterHomeTimeline is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=TwitterHomeTimeline
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=TwitterHomeTimeline
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=TwitterHomeTimeline
    • > Warning in wp-content/plugins/twitter-home-time-line/twitter.php+248
    Use of undefined constant submit - assumed 'submit' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=TwitterHomeTimeline
    • > Notice in wp-content/plugins/twitter-home-time-line/twitter.php+248
    Undefined index: submit

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/twitter-home-time-line/index.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-home-time-line/twitter.php:141

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Screenshot #1 (The widget in action) image required
The official readme.txt is a good inspiration

twitter-home-time-line/twitter.php 92% from 13 tests

The entry point to "Twitter Home Time line" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("twitter-home-time-line.php" instead of "twitter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin840 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4274336813
CSS13027

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.62
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods80
▷ Static methods1012.50%
▷ Public methods6986.25%
▷ Protected methods22.50%
▷ Private methods911.25%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png18.36KB9.22KB▼ 49.75%