78% search-tweets-widget

Code Review | Search Tweets Widget

WordPress plugin Search Tweets Widget scored78%from 54 tests.

About plugin

  • Plugin page: search-tweets-widget
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2014
  • Latest release: Feb 25, 2015
  • Number of updates: 5
  • Update frequency: every 67.4 days
  • Top authors: akeda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /763 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼4.43ms] Passed 4 tests

An overview of server-side resources used by Search Tweets Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2440.28 ▲2.21
Dashboard /wp-admin3.61 ▲0.3044.30 ▼3.14
Posts /wp-admin/edit.php3.66 ▲0.3049.31 ▲4.90
Add New Post /wp-admin/post-new.php6.13 ▲0.2478.45 ▼13.89
Media Library /wp-admin/upload.php3.47 ▲0.2433.94 ▼2.91
Search Tweets Widget /wp-admin/options-general.php?page=search_tweets_widget3.45333.79

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 14 new options
New WordPress options
search_tweets_widget_consumer_secret
search_tweets_widget_remaining
widget_theysaidso_widget
db_upgraded
search_tweets_widget_authorize_link
widget_recent-posts
can_compress_scripts
search_tweets_widget_reset
widget_search_tweets_widget
search_tweets_widget_consumer_key
...

Browser metrics Passed 4 tests

An overview of browser requirements for Search Tweets Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.27 ▼0.331.66 ▼0.0248.23 ▲8.80
Dashboard /wp-admin2,209 ▲355.63 ▼0.0492.20 ▲5.6937.64 ▼6.28
Posts /wp-admin/edit.php2,111 ▲142.01 ▲0.0138.76 ▲4.1138.51 ▲2.03
Add New Post /wp-admin/post-new.php1,536 ▲1023.09 ▼0.42676.88 ▲1.2252.73 ▼5.42
Media Library /wp-admin/upload.php1,411 ▲114.22 ▼0.0894.40 ▼13.7239.56 ▼4.51
Search Tweets Widget /wp-admin/options-general.php?page=search_tweets_widget9422.1623.2134.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 14 options in the database
    • can_compress_scripts
    • search_tweets_widget_authorize_link
    • search_tweets_widget_reset
    • search_tweets_widget_consumer_key
    • search_tweets_widget_schedule
    • search_tweets_widget_consumer_secret
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=search_tweets_widget
    • > 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=search_tweets_widget
    • > 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: tweets in wp-content/plugins/search-tweets-widget/views/widget.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/search-tweets-widget/includes/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/search-tweets-widget/search-tweets-widget.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/search-tweets-widget/views/widget.php:27
    • > PHP Notice
      Undefined variable: error in wp-content/plugins/search-tweets-widget/views/widget.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/search-tweets-widget/views/setting.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: widget, twitter, search

search-tweets-widget/search-tweets-widget.php 92% from 13 tests

The main file in "Search Tweets Widget" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,497 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP152675721,149
Bourne Again Shell24138152
Markdown337073
Bourne Shell112647
YAML15028
CSS14024
XML13024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity11.64
▷ Minimum class complexity3.00
▷ Maximum class complexity38.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods61
▷ Static methods34.92%
▷ Public methods4980.33%
▷ Protected methods69.84%
▷ Private methods69.84%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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
PNG images were not found in this plugin