10% showtweets-plugin

Code Review | ShowTweets Plugin

WordPress plugin ShowTweets Plugin scored10%from 54 tests.

About plugin

  • Plugin page: showtweets-plugin
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.3.1
  • WordPress version: 6.3.1
  • First release: Mar 3, 2012
  • Latest release: Mar 13, 2012
  • Number of updates: 9
  • Update frequency: every 1.1 days
  • Top authors: podz (55.56%)iwilson (55.56%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,783 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/showtweets-plugin/showtweets-plugin.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; showtweets_widget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼54.31ms] Passed 4 tests

This is a short check of server-side resources used by ShowTweets Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.16 ▼1.305.76 ▼38.64
Dashboard /wp-admin2.18 ▼1.1210.27 ▼48.34
Posts /wp-admin/edit.php2.18 ▼1.186.22 ▼40.26
Add New Post /wp-admin/post-new.php2.18 ▼3.715.55 ▼89.99
Media Library /wp-admin/upload.php2.18 ▼1.055.69 ▼29.82

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_showtweets_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

ShowTweets Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.37 ▲0.091.71 ▼0.1043.07 ▼6.25
Dashboard /wp-admin2,198 ▲215.62 ▲0.0992.06 ▼8.0840.36 ▼1.46
Posts /wp-admin/edit.php2,097 ▼32.16 ▲0.1339.68 ▲2.8036.77 ▼1.14
Add New Post /wp-admin/post-new.php1,526 ▼023.04 ▲0.05628.13 ▼49.6957.85 ▲3.05
Media Library /wp-admin/upload.php1,397 ▼34.15 ▼0.02100.38 ▼6.2042.32 ▼1.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/showtweets-plugin/showtweets-plugin.php+43
    Methods with the same name as their class will not be constructors in a future version of PHP; showtweets_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_showtweets_widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 0% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/showtweets-plugin/uninstall.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/showtweets-plugin/showtweets-plugin.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (screenshot1.png Showtweets Plugin as seen to your users), #2 (screenshot2.png Showtweets Plugin viewed from the administation section)
Please take inspiration from this readme.txt

showtweets-plugin/showtweets-plugin.php Passed 13 tests

The main PHP file in "ShowTweets Plugin" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
81 characters long description:
The showtweets plugin allows you to display your most recent tweets on your blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin560 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PO File4120188306
PHP29443253
CSS1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity31.00
▷ Minimum class complexity31.00
▷ Maximum class complexity31.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png13.61KB6.60KB▼ 51.54%
img/twitter.png1.64KB1.52KB▼ 7.33%
screenshot-1.png5.68KB3.56KB▼ 37.37%