94% simple-twitter-follow-me-button

Code Review | Simple Twitter Follow Me Button

WordPress plugin Simple Twitter Follow Me Button scored 94% from 54 tests.

About plugin

  • Plugin page: simple-twitter-fo...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 5.8.1
  • First release: Jan 25, 2014
  • Latest release: Feb 9, 2014
  • Number of updates: 11
  • Update frequency: every 1.4 days
  • Top authors: zackproser (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active / 3,369 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼151.79ms] Passed 4 tests

A check of server-side resources used by Simple Twitter Follow Me Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.81 ▲0.0931.73 ▲10.58
Dashboard /wp-admin3.07 ▲0.0246.77 ▼0.51
Posts /wp-admin/edit.php3.13 ▲0.0242.47 ▲0.94
Add New Post /wp-admin/post-new.php4.67 ▼0.7656.41 ▼598.37
Media Library /wp-admin/upload.php3.02 ▲0.0129.83 ▼9.21

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Twitter Follow Me Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.90 ▲0.218.88 ▼4.0151.86 ▲4.80
Dashboard /wp-admin2,967 ▲365.94 ▼0.03141.95 ▼14.72102.31 ▼8.28
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0166.70 ▼1.2486.61 ▲2.10
Add New Post /wp-admin/post-new.php3,634 ▲2,13614.98 ▼3.88468.23 ▲74.02102.47 ▼15.80
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.00157.82 ▼1.84109.93 ▼10.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-twitter-follow-me-button/tweetbutton.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: twitter, button, marketing, social media, follow

simple-twitter-follow-me-button/tweetbutton.php 92% from 13 tests

The main file in "Simple Twitter Follow Me Button" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-twitter-follow-me-button.php" instead of "tweetbutton.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin67 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP139967

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
simple-twitter-button1.png26.78KB6.49KB▼ 75.78%