78% wp-twitter-widget-by-ryoking

Code Review | WP Twitter widget by rYokiNG

WordPress plugin WP Twitter widget by rYokiNG scored78%from 54 tests.

About plugin

  • Plugin page: wp-twitter-widget...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2013
  • Latest release: Jul 27, 2013
  • Number of updates: 10
  • Update frequency: every 2.4 days
  • Top authors: domnoen.khamfu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,482 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼17.72ms] Passed 4 tests

A check of server-side resources used by WP Twitter widget by rYokiNG
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3141.70 ▼2.50
Dashboard /wp-admin3.42 ▲0.1136.31 ▼22.49
Posts /wp-admin/edit.php3.55 ▲0.1941.11 ▼18.24
Add New Post /wp-admin/post-new.php5.66 ▼0.2377.72 ▼27.65
Media Library /wp-admin/upload.php3.43 ▲0.1938.75 ▲3.73
WP Twitter Widget Options /wp-admin/options-general.php?page=wptw_options3.4033.00

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_wptw
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Twitter widget by rYokiNG
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲1714.35 ▼0.181.81 ▼0.0844.09 ▼2.55
Dashboard /wp-admin2,207 ▲335.55 ▼0.1282.88 ▼11.3539.57 ▲1.66
Posts /wp-admin/edit.php2,115 ▲151.98 ▲0.0239.10 ▲0.1838.06 ▲1.84
Add New Post /wp-admin/post-new.php1,537 ▲923.16 ▲0.29681.92 ▲75.1150.47 ▼7.07
Media Library /wp-admin/upload.php1,412 ▲94.18 ▼0.0196.50 ▼3.6750.01 ▲5.39
WP Twitter Widget Options /wp-admin/options-general.php?page=wptw_options1,1132.2341.0435.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_wptw
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=wptw_options
    • > Notice in wp-content/plugins/wp-twitter-widget-by-ryoking/wp_twitter_widget_by_ryoking.php+275
    Undefined index: wptw_safefrm
    • > GET request to /wp-admin/options-general.php?page=wptw_options
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=wptw_options
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-twitter-widget-by-ryoking/wp_twitter_widget_by_ryoking.php:19

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 is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-twitter-widget-by-ryoking === )
Please take inspiration from this readme.txt

wp-twitter-widget-by-ryoking/wp_twitter_widget_by_ryoking.php 92% from 13 tests

The main file in "WP Twitter widget by rYokiNG" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-twitter-widget-by-ryoking.php" instead of "wp_twitter_widget_by_ryoking.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,132 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33153961,114
CSS10018

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.15
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods81
▷ Static methods1012.35%
▷ Public methods7086.42%
▷ Protected methods22.47%
▷ Private methods911.11%
Functions16
▷ Named functions16100.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
3 PNG files occupy 0.34MB with 0.23MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png78.32KB21.71KB▼ 72.28%
assets/screenshot-1.png226.18KB39.72KB▼ 82.44%
assets/banner-772x250.png46.25KB25.83KB▼ 44.15%