84% custom-twitter-widget-pro

Code Review | Custom twitter widget pro

WordPress plugin Custom twitter widget pro scored84%from 54 tests.

About plugin

  • Plugin page: custom-twitter-wi...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 24, 2015
  • Latest release: Sep 2, 2016
  • Number of updates: 33
  • Update frequency: every 11.4 days
  • Top authors: Techvers (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /10,035 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.09MB] [CPU: ▼4.05ms] Passed 4 tests

Analyzing server-side resources used by Custom twitter widget pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1043.27 ▲4.44
Dashboard /wp-admin3.40 ▲0.0944.64 ▼6.27
Posts /wp-admin/edit.php3.51 ▲0.1547.34 ▲1.00
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.27 ▼11.95
Media Library /wp-admin/upload.php3.32 ▲0.0935.07 ▲1.03

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 9 new options
New WordPress options
ETWP_settings
widget_recent-posts
widget_etw_twitter
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
ETWP_twitter_sticky_settings

Browser metrics Passed 4 tests

Checking browser requirements for Custom twitter widget pro
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.54 ▼0.832.33 ▲0.5741.31 ▼3.84
Dashboard /wp-admin2,222 ▲314.82 ▼1.08104.93 ▼1.2142.31 ▲0.19
Posts /wp-admin/edit.php2,105 ▲132.01 ▼0.0039.72 ▲4.2935.56 ▲5.74
Add New Post /wp-admin/post-new.php1,550 ▲3118.48 ▼4.55604.53 ▼36.0551.15 ▼1.58
Media Library /wp-admin/upload.php1,407 ▲164.22 ▲0.0496.00 ▼5.5142.28 ▼4.90

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • ETWP_settings
    • widget_etw_twitter
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • ETWP_twitter_sticky_settings
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/custom-twitter-widget-pro/default_settings.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/custom-twitter-widget-pro/twitter-shortcode.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/custom-twitter-widget-pro/custom-twitter-widget-pro.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

custom-twitter-widget-pro/custom-twitter-widget-pro.php Passed 13 tests

The main PHP script in "Custom twitter widget pro" version 2.4 is automatically included on every request by WordPress
110 characters long description:
Display twitter feed on your WordPress site by using this plugin. Simply add your user name in widget setting.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected966 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP312358465
JavaScript4413448
CSS18153

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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.04MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
image/icon128.png6.40KB1.93KB▼ 69.83%
image/twitter_icon-jpg1.png16.68KB8.86KB▼ 46.86%
image/twitter-icon.png17.92KB0.67KB▼ 96.26%