84% post-tweets

Code Review | Post Tweets

WordPress plugin Post Tweets scored84%from 54 tests.

About plugin

  • Plugin page: post-tweets
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.0
  • WordPress version: 6.3.1
  • First release: Dec 26, 2013
  • Latest release: Dec 22, 2015
  • Number of updates: 7
  • Update frequency: every 103.7 days
  • Top authors: viaviwebtech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,897 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
Install script ran successfully

Server metrics [RAM: ▼0.68MB] [CPU: ▼16.34ms] Passed 4 tests

Server-side resources used by Post Tweets
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.18 ▼9.32
Dashboard /wp-admin3.33 ▲0.0251.51 ▼4.58
Posts /wp-admin/edit.php3.38 ▲0.0251.38 ▲5.08
Add New Post /wp-admin/post-new.php3.11 ▼2.7837.96 ▼50.63
Media Library /wp-admin/upload.php3.25 ▲0.0236.15 ▼0.82
Tweets Settings /wp-admin/admin.php?page=viavi_tweets_option_page3.2232.94
Post Tweets /wp-admin/admin.php?page=viavi_tweet_page3.2229.01

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Tweets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲18813.48 ▼0.878.39 ▲6.4341.06 ▼5.22
Dashboard /wp-admin2,219 ▲425.60 ▼0.0585.15 ▼15.9485.20 ▲43.07
Posts /wp-admin/edit.php2,142 ▲451.99 ▼0.0339.26 ▲2.9333.41 ▼0.82
Add New Post /wp-admin/post-new.php6,261 ▲4,73320.73 ▼2.40944.34 ▲242.6655.18 ▲2.78
Media Library /wp-admin/upload.php1,436 ▲364.20 ▼0.01101.01 ▼2.7477.73 ▲33.79
Tweets Settings /wp-admin/admin.php?page=viavi_tweets_option_page9092.1824.4629.96
Post Tweets /wp-admin/admin.php?page=viavi_tweet_page8142.0125.9225.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/post-tweets/tweets-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/post-tweets/index.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-tweets/tweets-post.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Post custom tweets), #2 (Set twitter account), #3 (If you want to post as tweet)
Please take inspiration from this readme.txt

post-tweets/index.php 92% from 13 tests

This is the main PHP file of "Post Tweets" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("post-tweets.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin832 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5232337811
CSS10012
JavaScript1559

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions7
▷ Named functions7100.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
4 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
style/twitter_icon.png0.57KB0.48KB▼ 15.49%
screenshot-2.png64.41KB28.25KB▼ 56.14%
screenshot-3.png16.06KB9.40KB▼ 41.51%
screenshot-1.png22.87KB12.72KB▼ 44.38%