10% tweets-rotator-2013

Code Review | Tweets Rotator 2013

WordPress plugin Tweets Rotator 2013 scored10%from 54 tests.

About plugin

  • Plugin page: tweets-rotator-2013
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.5
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Jun 29, 2016
  • Number of updates: 15
  • Update frequency: every 73.5 days
  • Top authors: sabirtiger (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /3,025 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/tweets-rotator-2013/twitter_widget.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; Sabby_Twitter has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼48.86ms] Passed 4 tests

A check of server-side resources used by Tweets Rotator 2013
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.1810.18 ▼28.29
Dashboard /wp-admin2.29 ▼1.0511.38 ▼47.32
Posts /wp-admin/edit.php2.29 ▼1.0610.49 ▼36.18
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.73 ▼83.66
Media Library /wp-admin/upload.php2.29 ▼0.9411.44 ▼22.40

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
widget_sabby_twitter
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Tweets Rotator 2013: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.08 ▼0.581.74 ▲0.0843.93 ▲2.77
Dashboard /wp-admin2,192 ▲275.59 ▼0.0287.39 ▲2.9642.63 ▼2.99
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0335.44 ▲1.0832.71 ▼5.19
Add New Post /wp-admin/post-new.php1,526 ▼223.03 ▼0.02658.95 ▼33.8664.42 ▲15.88
Media Library /wp-admin/upload.php1,400 ▲34.19 ▼0.04100.02 ▼1.6145.38 ▲1.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Sabby_Twitter is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_sabby_twitter
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tweets-rotator-2013/twitter_widget.php:14

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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif).), #2 (This screen shot description corresponds to screenshot-2.(png|jpg|jpeg|gif).)
You can take inspiration from this readme.txt

tweets-rotator-2013/twitter_widget.php 92% from 13 tests

"Tweets Rotator 2013" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tweets-rotator-2013.php" instead of "twitter_widget.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 plugin205 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21579135
CSS118570

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/twitter-bird-blue-on-white.png0.87KB0.64KB▼ 26.79%
image/plugin_twitter_bg.png4.41KB1.91KB▼ 56.77%
screenshot-2.png6.46KB3.14KB▼ 51.44%
image/twitter_bird.png0.60KB0.63KB0.00%
image/twitter_bird_01.png0.68KB0.66KB▼ 2.86%