88% fetch-twitter-count-for-wordpress

Code Review | Fetch Twitter Count

WordPress plugin Fetch Twitter Count scored 88% from 54 tests.

About plugin

  • Plugin page: fetch-twitter-cou...
  • Plugin version: 2017.08.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.8.0
  • WordPress version: 5.8.1
  • First release: May 24, 2012
  • Latest release: Jul 13, 2017
  • Number of updates: 13
  • Update frequency: every 144.4 days
  • Top authors: christopherross (69.23%)horshipsrectors (38.46%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,208 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼137.48ms] Passed 4 tests

Server-side resources used by Fetch Twitter Count
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0033.96 ▲3.49
Dashboard /wp-admin3.07 ▲0.02111.66 ▲71.01
Posts /wp-admin/edit.php3.12 ▲0.0161.11 ▲13.21
Add New Post /wp-admin/post-new.php5.43 ▼0.0195.54 ▼565.55
Media Library /wp-admin/upload.php3.01 ▲0.0130.70 ▼1.08
Twitter Count /wp-admin/options-general.php?page=horshipsrectors_twitter_count2.9628.78

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Fetch Twitter Count
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.79 ▲0.318.69 ▼2.2154.80 ▲4.44
Dashboard /wp-admin2,994 ▲665.99 ▲0.03156.89 ▼3.80124.22 ▼6.77
Posts /wp-admin/edit.php2,722 ▼172.68 ▼0.0163.54 ▼11.8598.86 ▲1.02
Add New Post /wp-admin/post-new.php1,675 ▲7118.78 ▲0.07366.82 ▲0.21106.91 ▼1.96
Media Library /wp-admin/upload.php1,815 ▲85.02 ▲0.02139.40 ▼17.31123.37 ▼2.42
Twitter Count /wp-admin/options-general.php?page=horshipsrectors_twitter_count1,0562.1059.6494.67

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=horshipsrectors_twitter_count
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=horshipsrectors_twitter_count
    • > User deprecated in wp-includes/functions.php+5221
    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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/fetch-twitter-count-for-wordpress/fetch-twitter-count-for-wordpress.php:89

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: ""
The official readme.txt might help

fetch-twitter-count-for-wordpress/fetch-twitter-count-for-wordpress.php Passed 13 tests

Analyzing the main PHP file in "Fetch Twitter Count" version 2017.08.13
43 characters long description:
Fetch the Twitter count for a specific user

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 plugin103 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions11100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin