83% wordpress-dashboard-twitter

Code Review | WordPress Dashboard Tweeter

WordPress plugin WordPress Dashboard Tweeter scored83%from 54 tests.

About plugin

  • Plugin page: wordpress-dashboa...
  • Plugin version: 1.3.2
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2.99
  • WordPress version: 6.3.1
  • First release: Jun 29, 2009
  • Latest release: May 22, 2023
  • Number of updates: 145
  • Update frequency: every 35.0 days
  • Top authors: Alphawolf (98.62%)ratterobert (2.07%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /55,174 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.22ms] Passed 4 tests

A check of server-side resources used by WordPress Dashboard Tweeter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.04 ▼7.19
Dashboard /wp-admin3.39 ▲0.0844.35 ▼4.73
Posts /wp-admin/edit.php3.44 ▲0.0846.09 ▲2.03
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.19 ▲2.40
Media Library /wp-admin/upload.php3.31 ▲0.0833.73 ▲1.02

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Dashboard Tweeter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼0.951.58 ▼0.3538.85 ▼6.03
Dashboard /wp-admin2,213 ▲395.86 ▼0.02108.33 ▼10.1839.73 ▼8.04
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0139.32 ▲3.5937.76 ▲3.07
Add New Post /wp-admin/post-new.php1,546 ▲1318.62 ▼4.67625.00 ▼84.7956.22 ▼5.23
Media Library /wp-admin/upload.php1,395 ▲74.24 ▲0.0197.63 ▼2.0645.78 ▲2.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wordpress-dashboard-twitter/wpdt.class.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wordpress-dashboard-twitter/wp-dashboard-twitter.php:38
    • > PHP Notice
      Undefined index: wp_version in wp-content/plugins/wordpress-dashboard-twitter/wpdt.class.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/wordpress-dashboard-twitter/inc/vendor/abraham/twitteroauth/src/TwitterOAuth.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/wordpress-dashboard-twitter/inc/vendor/abraham/twitteroauth/src/HmacSha1.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WPDashboardTwitter' not found in wp-content/plugins/wordpress-dashboard-twitter/inc/wpdt-helper.class.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

wordpress-dashboard-twitter/wp-dashboard-twitter.php 77% from 13 tests

Analyzing the main PHP file in "WordPress Dashboard Tweeter" version 1.3.2
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wordpress-dashboard-twitter.php" instead of "wp-dashboard-twitter.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin4,170 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP325641,9512,641
PO File83997251,056
JSON400265
CSS2250127
Markdown229078
JavaScript3003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity16.41
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes22
▷ Abstract classes29.09%
▷ Concrete classes2090.91%
▷ Final classes00.00%
Methods197
▷ Static methods4824.37%
▷ Public methods16483.25%
▷ Protected methods73.55%
▷ Private methods2613.20%
Functions11
▷ Named functions763.64%
▷ Anonymous functions436.36%
Constants23
▷ Global constants834.78%
▷ Class constants1565.22%
▷ Public constants1280.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/img/retweet.png1.07KB0.14KB▼ 87.03%
inc/img/reply.png1.13KB0.19KB▼ 83.09%
inc/img/reply_hover.png1.13KB0.18KB▼ 83.65%
inc/img/twitter_signin_badge.png1.93KB2.05KB0.00%
inc/img/retweet_hover.png1.07KB0.14KB▼ 87.10%