84% fetch-some-tweets

Code Review | Fetch Some Tweets

WordPress plugin Fetch Some Tweets scored 84% from 54 tests.

About plugin

  • Plugin page: fetch-some-tweets
  • Plugin version: 1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Oct 4, 2018
  • Latest release: Apr 15, 2023
  • Number of updates: 24
  • Update frequency: every 69.2 days
  • Top authors: pixelsandthings (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 888 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.04ms] Passed 4 tests

Server-side resources used by Fetch Some Tweets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.81 ▼5.82
Dashboard /wp-admin3.33 ▲0.0346.05 ▼12.26
Posts /wp-admin/edit.php3.38 ▲0.0246.15 ▲1.36
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.83 ▼3.45
Media Library /wp-admin/upload.php3.25 ▲0.0237.06 ▲5.87
Fetch Some Tweets /wp-admin/options-general.php?page=fetch_some_tweets3.2231.84

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 40 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Fetch Some Tweets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7414.78 ▲0.401.93 ▼0.6344.36 ▼0.13
Dashboard /wp-admin2,212 ▲245.86 ▲0.7298.33 ▼21.9935.97 ▼11.24
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0434.61 ▼3.9633.30 ▲1.49
Add New Post /wp-admin/post-new.php1,533 ▲1422.70 ▼0.22644.45 ▼17.5956.42 ▲3.33
Media Library /wp-admin/upload.php1,394 ▲94.18 ▼0.0193.00 ▼9.8740.81 ▼2.15
Fetch Some Tweets /wp-admin/options-general.php?page=fetch_some_tweets8822.1722.6627.30

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/fetch-some-tweets/vendor/abraham/twitteroauth/src/HmacSha1.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/fetch-some-tweets/vendor/abraham/twitteroauth/src/TwitterOAuth.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt might help

fetch-some-tweets/fetch-some-tweets.php Passed 13 tests

The primary PHP file in "Fetch Some Tweets" version 1.5 is used by WordPress to initiate all plugin functionality
44 characters long description:
JSON Driven PHP Twitter Feed via Twitter API

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
Success! There were no dangerous files found in this plugin2,476 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP275051,2542,133
JSON400265
Markdown229078

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.24
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods156
▷ Static methods3723.72%
▷ Public methods12982.69%
▷ Protected methods10.64%
▷ Private methods2616.67%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected