84% get-tweets-in-php

Code Review | Get Tweets in PHP

WordPress plugin Get Tweets in PHP scored84%from 54 tests.

About plugin

  • Plugin page: get-tweets-in-php
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Aug 24, 2015
  • Latest release: Dec 28, 2016
  • Number of updates: 34
  • Update frequency: every 14.5 days
  • Top authors: azanelli (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,281 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.08MB] [CPU: ▼4.95ms] Passed 4 tests

This is a short check of server-side resources used by Get Tweets in PHP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.39 ▼3.74
Dashboard /wp-admin3.38 ▲0.0841.79 ▼7.16
Posts /wp-admin/edit.php3.50 ▲0.1446.43 ▲4.35
Add New Post /wp-admin/post-new.php5.96 ▲0.0879.79 ▼11.06
Media Library /wp-admin/upload.php3.30 ▲0.0838.82 ▲2.18

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Get Tweets in PHP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.074.14 ▲2.3637.63 ▼7.80
Dashboard /wp-admin2,206 ▲216.01 ▲0.19114.96 ▲15.7742.72 ▲1.04
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0136.34 ▲2.2133.81 ▼0.45
Add New Post /wp-admin/post-new.php1,514 ▼517.52 ▼5.61664.80 ▼3.1754.12 ▼2.86
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0694.39 ▼4.0340.26 ▼4.27

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant GET_TWEETS_IN_PHP__PLUGIN_DIR - assumed 'GET_TWEETS_IN_PHP__PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/get-tweets-in-php/Netgloo/GetTweetsInPhp.php on line 6
    • > PHP Warning
      require_once(GET_TWEETS_IN_PHP__PLUGIN_DIRTwitterAPIExchange.php): failed to open stream: No such file or directory in wp-content/plugins/get-tweets-in-php/Netgloo/GetTweetsInPhp.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'GET_TWEETS_IN_PHP__PLUGIN_DIRTwitterAPIExchange.php' (include_path='.:/usr/share/php') in wp-content/plugins/get-tweets-in-php/Netgloo/GetTweetsInPhp.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/get-tweets-in-php/get-tweets-in-php.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: twitter, tweets, latest-tweets, developers, tweet

get-tweets-in-php/get-tweets-in-php.php Passed 13 tests

Analyzing the main PHP file in "Get Tweets in PHP" version 1.2
100 characters long description:
Get tweets from a Twitter account with a couple of lines of PHP, and do anything you want with them.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected519 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4178339517
Markdown1102

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.31
Average class complexity19.33
▷ Minimum class complexity14.00
▷ Maximum class complexity30.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods1050.00%
▷ Public methods1050.00%
▷ Protected methods00.00%
▷ Private methods1050.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin