79% twitter-posts-to-blog

Code Review | Twitter posts to Blog

WordPress plugin Twitter posts to Blog scored79%from 54 tests.

About plugin

  • Plugin page: twitter-posts-to-...
  • Plugin version: 1.11.25
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Apr 4, 2016
  • Number of updates: 126
  • Update frequency: every 9.8 days
  • Top authors: badbreze (98.41%)sforsberg (2.38%)

Code review

54 tests

User reviews

15 reviews

Install metrics

200+ active /25,716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.29MB] [CPU: ▼2.00ms] Passed 4 tests

A check of server-side resources used by Twitter posts to Blog
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.4742.96 ▲2.10
Dashboard /wp-admin3.67 ▲0.3350.42 ▲1.80
Posts /wp-admin/edit.php3.71 ▲0.3253.23 ▲1.82
Add New Post /wp-admin/post-new.php6.18 ▲0.26102.42 ▼13.72
Media Library /wp-admin/upload.php3.52 ▲0.2641.16 ▲6.81
Twitter To WP /wp-admin/admin.php?page=dg_tw_admin_menu3.7134.76
Manual Posting /wp-admin/admin.php?page=dg_tw_retrieve_menu3.5132.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: no files
Database: no new tables, 9 new options
New WordPress options
dg_tw_publish
dg_tw_ft
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
dg_tw_time
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Twitter posts to Blog
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.39 ▼1.161.68 ▲0.0941.00 ▼7.39
Dashboard /wp-admin2,254 ▲665.90 ▲1.01107.51 ▼3.6541.07 ▼0.22
Posts /wp-admin/edit.php2,137 ▲482.07 ▲0.0940.80 ▲0.1434.75 ▲0.72
Add New Post /wp-admin/post-new.php1,557 ▲2423.35 ▼0.05681.37 ▲22.3448.76 ▼8.63
Media Library /wp-admin/upload.php1,439 ▲484.25 ▲0.0599.05 ▼6.8742.22 ▼1.66
Twitter To WP /wp-admin/admin.php?page=dg_tw_admin_menu2,1951.9228.9029.95
Manual Posting /wp-admin/admin.php?page=dg_tw_retrieve_menu7131.627.8521.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • dg_tw_ft
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • dg_tw_time
    • dg_tw_publish

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=dg_tw_admin_menu
    • > Warning in wp-content/plugins/twitter-posts-to-blog/admin_page.php+4
    Use of undefined constant KNEWS_URL - assumed 'KNEWS_URL' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=dg_tw_admin_menu
    • > Notice in wp-content/plugins/twitter-posts-to-blog/admin_page.php+306
    Undefined index: access_key
    • > GET request to /wp-admin/admin.php?page=dg_tw_admin_menu
    • > Notice in wp-content/plugins/twitter-posts-to-blog/admin_page.php+308
    Undefined index: access_secret
    • > GET request to /wp-admin/admin.php?page=dg_tw_admin_menu
    • > Notice in wp-content/plugins/twitter-posts-to-blog/admin_page.php+310
    Undefined index: access_token
    • > GET request to /wp-admin/admin.php?page=dg_tw_admin_menu
    • > Notice in wp-content/plugins/twitter-posts-to-blog/admin_page.php+312
    Undefined index: access_token_secret

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 fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant KNEWS_URL - assumed 'KNEWS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/twitter-posts-to-blog/admin_page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/twitter-posts-to-blog/retrieve_page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/twitter-posts-to-blog/admin_page.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: autopost, twitter

twitter-posts-to-blog/twitter-posts-to-blog.php Passed 13 tests

The main PHP script in "Twitter posts to Blog" version 1.11.25 is automatically included on every request by WordPress
24 characters long description:
Post twetts to your blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,353 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP64274031,777
PO File2238238517
JavaScript113049
CSS21510

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity7.92
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods76
▷ Static methods1013.16%
▷ Public methods6585.53%
▷ Protected methods22.63%
▷ Private methods911.84%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/balloon-twitter-left.png1.90KB1.13KB▼ 40.72%