68% awesome-twitter-feeds

Code Review | Awesome Twitter Feeds

WordPress plugin Awesome Twitter Feeds scored68%from 54 tests.

About plugin

  • Plugin page: awesome-twitter-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 30, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: titodevera (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,596 total downloads

Benchmarks

Plugin footprint 65% 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.23MB] [CPU: ▼1.55ms] Passed 4 tests

A check of server-side resources used by Awesome Twitter Feeds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1442.90 ▼8.76
Dashboard /wp-admin3.55 ▲0.2550.33 ▼4.30
Posts /wp-admin/edit.php3.67 ▲0.3155.20 ▲5.67
Add New Post /wp-admin/post-new.php6.16 ▲0.2792.90 ▲1.75
Media Library /wp-admin/upload.php3.47 ▲0.2541.70 ▲5.12
Add new /wp-admin/post-new.php?post_type=atfeeds3.5253.89
All feeds /wp-admin/edit.php?post_type=atfeeds3.5236.49

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 67 new files
Database: no new tables, 7 new options
New WordPress options
widget_atf_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Awesome Twitter Feeds
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.93 ▼0.448.74 ▲6.9945.87 ▲1.84
Dashboard /wp-admin2,245 ▲715.81 ▲0.1995.87 ▼3.7241.66 ▼1.74
Posts /wp-admin/edit.php2,149 ▲492.30 ▲0.2938.48 ▲2.0534.22 ▲2.44
Add New Post /wp-admin/post-new.php1,564 ▲2723.38 ▲5.33691.25 ▲69.8036.62 ▼30.24
Media Library /wp-admin/upload.php1,444 ▲474.54 ▲0.35111.31 ▲14.0248.23 ▲0.34
Add new /wp-admin/post-new.php?post_type=atfeeds1,7522.8054.2542.27
All feeds /wp-admin/edit.php?post_type=atfeeds1,1312.2333.9426.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/awesome-twitter-feeds/uninstall.php+7
    Invalid argument supplied for foreach()
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_atf_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 18× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/classes/field-types/class.avs-metabox-field-email.php
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/classes/field-types/class.avs-metabox-field-select.php
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/classes/field-types/class.avs-metabox-field-textarea.php
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/init.php
    • > /wp-content/plugins/awesome-twitter-feeds/classes/class-atf-plugin.php
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/classes/field-types/class.avs-metabox-field-text.php
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/classes/field-types/class.avs-metabox-field-number.php
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/classes/field-types/class.avs-metabox-field-editor.php
    • > /wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/classes/field-types/class.avs-metabox-field-image.php
    • > /wp-content/plugins/awesome-twitter-feeds/classes/class-atf-widget.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/TwitterOAuthTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/src/HmacSha1.php:15
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/Util/JsonDecoderTest.php:7
    • > PHP Warning
      require(wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Avs_Metabox_Wrapper\\Avs_Metabox' not found in wp-content/plugins/awesome-twitter-feeds/inc/avs-metaboxes-master/examples/full.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/awesome-twitter-feeds/templates/template-widget-admin.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Tests\\AbstractSignatureMethodTest' not found in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/HmacSha1Test.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/ConsumerTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/awesome-twitter-feeds/inc/twitteroauth-master/tests/AbstractSignatureMethodTest.php:7

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 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
These attributes need your attention:
  • Donate link: Please fix this invalid url: "mailto:albertodeverasevilla@gmail.com"
You can look at the official readme.txt

awesome-twitter-feeds/main.php 85% from 13 tests

The entry point to "Awesome Twitter Feeds" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 250 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("awesome-twitter-feeds.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin3,703 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP394438462,073
CSS545271,063
JavaScript26432316
PO File15656125
Markdown312041
JSON10034
XML22123
SVG10017
YAML10011

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.21
Average class complexity5.38
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes32
▷ Abstract classes39.38%
▷ Concrete classes2990.62%
▷ Final classes1241.38%
Methods177
▷ Static methods73.95%
▷ Public methods15889.27%
▷ Protected methods52.82%
▷ Private methods147.91%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants18
▷ Global constants1477.78%
▷ Class constants422.22%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon_play.png16.37KB1.60KB▼ 90.20%
assets/img/icon_twitter.png2.03KB0.83KB▼ 58.91%