10% wplook-twitter-follow-button-new

Code Review | Twitter Follow Button

WordPress plugin Twitter Follow Button scored 10% from 54 tests.

About plugin

  • Plugin page: wplook-twitter-fo...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2011
  • Latest release: Jan 10, 2016
  • Number of updates: 22
  • Update frequency: every 76.5 days
  • Top authors: valeriutihai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 18,851 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wplook-twitter-follow-button-new/wplook-twitter-follow-button-new.php+17
    Function create_function() is deprecated

Server metrics [RAM: ▼1.88MB] [CPU: ▼58.47ms] Passed 4 tests

Analyzing server-side resources used by Twitter Follow Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.354.54 ▼44.37
Dashboard /wp-admin2.13 ▼1.176.41 ▼52.91
Posts /wp-admin/edit.php2.13 ▼1.225.36 ▼45.30
Add New Post /wp-admin/post-new.php2.13 ▼3.766.53 ▼91.29
Media Library /wp-admin/upload.php2.13 ▼1.105.46 ▼29.70

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_wplooktwitterfollowbutton
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Twitter Follow Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11614.38 ▲0.0133.94 ▲32.0543.93 ▲0.27
Dashboard /wp-admin2,206 ▲175.83 ▲0.89107.47 ▼18.8839.68 ▼6.79
Posts /wp-admin/edit.php2,086 ▼02.05 ▼0.0136.24 ▲0.6733.56 ▲0.77
Add New Post /wp-admin/post-new.php1,533 ▲1223.34 ▲0.10614.29 ▼34.0343.05 ▼9.18
Media Library /wp-admin/upload.php1,388 ▲94.23 ▲0.01104.96 ▲2.2644.46 ▼0.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/wplook-twitter-follow-button-new/wplook-twitter-follow-button-new.php+17
    Function create_function() is deprecated
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_wplooktwitterfollowbutton
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wplook-twitter-follow-button-new/wplook-twitter-follow-button-new.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Plugin Name: Please specify the plugin name on the first line ( === wplook-twitter-follow-button-new === )
  • Screenshots: These screenshots do not have images: #1 (The configuration options for the front-end widget. Twitter Follow Button), #2 (An example of a front-end widget view.)
The official readme.txt is a good inspiration

wplook-twitter-follow-button-new/wplook-twitter-follow-button-new.php 92% from 13 tests

The main file in "Twitter Follow Button" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 185 characters long)

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
Success! There were no dangerous files found in this plugin216 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22218139
PO File1296777

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png14.45KB8.60KB▼ 40.50%
screenshot-2.png5.02KB3.14KB▼ 37.55%