10% responsive-twitter-widget

Code Review | responsive-twitter-widget

WordPress plugin responsive-twitter-widget scored10%from 54 tests.

About plugin

  • Plugin page: responsive-twitte...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Dec 24, 2015
  • Number of updates: 15
  • Update frequency: every 15.1 days
  • Top authors: engrmostafijur (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /5,258 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/responsive-twitter-widget/twitter-widget.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; pix_responsive_twitter_feed has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼58.65ms] Passed 4 tests

This is a short check of server-side resources used by responsive-twitter-widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.59 ▼35.37
Dashboard /wp-admin2.10 ▼1.255.80 ▼58.85
Posts /wp-admin/edit.php2.10 ▼1.266.56 ▼47.36
Add New Post /wp-admin/post-new.php2.10 ▼3.796.30 ▼93.00
Media Library /wp-admin/upload.php2.10 ▼1.135.68 ▼29.22

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_pix_responsive_twitter
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for responsive-twitter-widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5613.26 ▼1.322.02 ▼0.0748.16 ▲6.94
Dashboard /wp-admin2,224 ▲214.85 ▼1.0599.27 ▼6.1840.23 ▼4.88
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0435.93 ▼0.1033.58 ▼3.88
Add New Post /wp-admin/post-new.php1,545 ▼1123.02 ▲4.73637.86 ▼11.9360.20 ▲10.34
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.1298.89 ▼8.2546.09 ▲3.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/responsive-twitter-widget/twitter-widget.php+23
    Methods with the same name as their class will not be constructors in a future version of PHP; pix_responsive_twitter_feed has a deprecated constructor
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_pix_responsive_twitter
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Twitter Widget in action), #2 (Twitter Widget ID Collection options), #3 (Admin dashboard Widget Settings)
  • Tags: Too many tags (101 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

responsive-twitter-widget/twitter-widget.php 92% from 13 tests

"responsive-twitter-widget" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("responsive-twitter-widget.php" instead of "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
No dangerous file extensions were detected129 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP313097
CSS13332

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.27MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png14.50KB6.93KB▼ 52.22%
screenshot-2.png92.78KB36.86KB▼ 60.27%
screenshot-1.png166.52KB72.21KB▼ 56.64%