66% arrow-twitter-feed

Code Review | Arrow Custom Feed for Twitter

WordPress plugin Arrow Custom Feed for Twitter scored66%from 54 tests.

About plugin

  • Plugin page: arrow-twitter-feed
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2016
  • Latest release: Nov 1, 2019
  • Number of updates: 101
  • Update frequency: every 10.3 days
  • Top authors: arrowplugins (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

1,000+ active /75,322 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.98ms] Passed 4 tests

A check of server-side resources used by Arrow Custom Feed for Twitter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1840.85 ▲1.82
Dashboard /wp-admin3.48 ▲0.1746.08 ▼4.02
Posts /wp-admin/edit.php3.53 ▲0.1747.12 ▼0.35
Add New Post /wp-admin/post-new.php6.08 ▲0.1983.99 ▼19.64
Media Library /wp-admin/upload.php3.40 ▲0.1734.52 ▲0.10
Support /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_form_support3.4132.09
Rate us /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_rate_us_plugins3.3733.47
Add New /wp-admin/post-new.php?post_type=tfba_twitter_feed3.5361.36
Our Plugins /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_our_plugins3.3733.00
All Twitter Feeds /wp-admin/edit.php?post_type=tfba_twitter_feed3.4443.11

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 134 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Arrow Custom Feed for Twitter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲24213.85 ▼0.456.92 ▲5.2242.47 ▲3.96
Dashboard /wp-admin2,266 ▲815.03 ▲0.13103.32 ▼12.0340.89 ▼0.09
Posts /wp-admin/edit.php2,157 ▲652.31 ▲0.2641.53 ▲6.8136.17 ▲3.57
Add New Post /wp-admin/post-new.php1,562 ▲2023.30 ▲5.02686.32 ▲85.4537.13 ▼18.00
Media Library /wp-admin/upload.php1,451 ▲604.42 ▲0.2296.55 ▼1.7541.12 ▼2.72
Support /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_form_support9442.1128.9239.45
Rate us /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_rate_us_plugins8791.9727.6129.95
Add New /wp-admin/post-new.php?post_type=tfba_twitter_feed3,12110.86377.88138.00
Our Plugins /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_our_plugins1,0361.9827.6592.57
All Twitter Feeds /wp-admin/edit.php?post_type=tfba_twitter_feed1,1292.2534.5527.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_form_support
    • > Notice in wp-content/plugins/arrow-twitter-feed/includes/tfba-support-page.php+486
    Undefined variable: _SESSION

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/arrow-twitter-feed/js/template.php
    • > /wp-content/plugins/arrow-twitter-feed/includes/tfba-rate-us.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/arrow-twitter-feed/includes/tfba-custom-columns.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arrow-twitter-feed/includes/tfba-post-type.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/arrow-twitter-feed/includes/tfba-shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/arrow-twitter-feed/includes/tfba-settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arrow-twitter-feed/includes/tfba-save-post.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arrow-twitter-feed/includes/tfba-post-meta-boxes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/arrow-twitter-feed/includes/tfba-our-plugins.php:81
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/arrow-twitter-feed/includes/tfba-enqueue-scripts.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_form_support
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Modernizr is not defined" "ReferenceError: Modernizr is not defined\n at HTMLInputElement.\u003Canonymous> (/wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_form_support:174:3)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:3129)\n at e.\u003Ccomputed>.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:1594)\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_form_support:171:15)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=tfba_twitter_feed&page=tfba_form_support
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: Modernizr is not defined
    • > GET request to /wp-admin/post-new.php?post_type=tfba_twitter_feed
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/post-new.php?post_type=tfba_twitter_feed
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/post-new.php?post_type=tfba_twitter_feed
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
Please take inspiration from this readme.txt

arrow-twitter-feed/twitter-feed-by-arrowplugins.php 92% from 13 tests

The main PHP file in "Arrow Custom Feed for Twitter" ver. 1.5.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("arrow-twitter-feed.php" instead of "twitter-feed-by-arrowplugins.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected26,888 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript921,7271,95824,490
PHP122871052,272
CSS185126

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
25 PNG files occupy 2.41MB with 1.85MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/template1.png95.67KB29.45KB▼ 69.22%
includes/images/blog_style.png25.49KB1.38KB▼ 94.61%
includes/images/rounded.png22.59KB1.89KB▼ 91.61%
includes/images/ilogo.png135.83KB45.77KB▼ 66.31%
includes/images/accepted_48.png5.13KB1.89KB▼ 63.13%