10% wp-twitterbadge

Code Review | WP-TwitterBadge

WordPress plugin WP-TwitterBadge scored10%from 54 tests.

About plugin

  • Plugin page: wp-twitterbadge
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.8
  • WordPress version: 6.3.1
  • First release: Jul 9, 2009
  • Latest release: Dec 16, 2016
  • Number of updates: 13
  • Update frequency: every 222.4 days
  • Top authors: kyleabaker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /13,566 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-twitterbadge/wp-twitterbadge.php+85
    Undefined variable: tb_twitter_account

Server metrics [RAM: ▼1.92MB] [CPU: ▼58.48ms] Passed 4 tests

Server-side resources used by WP-TwitterBadge
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.396.57 ▼36.89
Dashboard /wp-admin2.10 ▼1.259.92 ▼58.85
Posts /wp-admin/edit.php2.10 ▼1.269.06 ▼42.90
Add New Post /wp-admin/post-new.php2.10 ▼3.7912.25 ▼95.28
Media Library /wp-admin/upload.php2.10 ▼1.137.93 ▼28.24
WP-TwitterBadge /wp-admin/options-general.php?page=wp-twitterbadge/wp-twitterbadge-options.php2.108.12

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

WP-TwitterBadge: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.32 ▼0.291.77 ▲0.2042.58 ▼2.57
Dashboard /wp-admin2,202 ▲255.58 ▼0.0790.03 ▼1.2141.78 ▼4.19
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0737.92 ▼3.8138.78 ▼7.48
Add New Post /wp-admin/post-new.php1,531 ▲523.16 ▲0.02665.80 ▲16.4854.57 ▲1.43
Media Library /wp-admin/upload.php1,407 ▲74.24 ▲0.0496.18 ▼5.5444.41 ▲2.27
WP-TwitterBadge /wp-admin/options-general.php?page=wp-twitterbadge/wp-twitterbadge-options.php1,2461.8134.2832.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-twitterbadge/wp-twitterbadge.php+85
    Undefined variable: tb_twitter_account
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-twitterbadge/wp-twitterbadge-options.php
    • > Notice in wp-content/plugins/wp-twitterbadge/wp-twitterbadge.php+85
    Undefined variable: tb_twitter_account

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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-twitterbadge/wp-twitterbadge-options.php
    • > /wp-content/plugins/wp-twitterbadge/wp-twitterbadge.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
7 plugin tags: link, social, tweet, twitter, friend...

wp-twitterbadge/wp-twitterbadge.php Passed 13 tests

"WP-TwitterBadge" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
132 characters long description:
WP-TwitterBadge lets you easily add a small Twitter badge to the side of your blog to invite your visitors to follow you on Twitter!

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
There were no executable files found in this plugin418 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP35899360
JavaScript20058

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/my-twitter.png1.48KB1.57KB0.00%
img/follow-me.png1.60KB1.66KB0.00%
img/follow.png1.43KB1.43KB0.27%
img/icon-about.png0.17KB0.17KB0.00%
img/color.png0.82KB1.07KB0.00%