84% twitter-auto-publish

Code Review | WP Twitter Auto Publish

WordPress plugin WP Twitter Auto Publish scored84%from 54 tests.

About plugin

  • Plugin page: twitter-auto-publish
  • Plugin version: 1.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 10, 2013
  • Latest release: Jul 1, 2023
  • Number of updates: 46
  • Update frequency: every 77.9 days
  • Top authors: f1logic (100%)

Code review

54 tests

User reviews

198 reviews

Install metrics

6,000+ active /185,235 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▲1.19ms] Passed 4 tests

This is a short check of server-side resources used by WP Twitter Auto Publish
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.79 ▲5.26
Dashboard /wp-admin3.34 ▲0.0443.76 ▼1.05
Posts /wp-admin/edit.php3.39 ▲0.0348.66 ▲1.83
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.54 ▼1.28
Media Library /wp-admin/upload.php3.26 ▲0.0339.10 ▲7.10
Logs /wp-admin/admin.php?page=twitter-auto-publish-log3.2931.61
About /wp-admin/admin.php?page=twitter-auto-publish-about3.6233.98
Suggest a Feature /wp-admin/admin.php?page=twitter-auto-publish-suggest-features3.3131.04
Settings /wp-admin/admin.php?page=twitter-auto-publish-settings3.5732.19

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 93 new files
Database: no new tables, 36 new options
New WordPress options
widget_recent-comments
xyz_credit_link
xyz_twap_free_version
xyz_twap_default_selection_edit
widget_theysaidso_widget
xyz_twap_twaccestok_secret
xyz_twap_xyzscripts_hash_val
xyz_twap_smapsoln_userid
xyz_twap_future_to_publish
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Twitter Auto Publish
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.34 ▼1.041.72 ▲0.0441.36 ▼0.31
Dashboard /wp-admin2,247 ▲625.85 ▼0.0097.68 ▼4.8382.71 ▲39.64
Posts /wp-admin/edit.php2,130 ▲382.04 ▲0.0337.21 ▼2.4333.35 ▼3.04
Add New Post /wp-admin/post-new.php1,702 ▲16022.44 ▲4.05746.39 ▲127.7954.27 ▼2.09
Media Library /wp-admin/upload.php1,420 ▲384.12 ▼0.0995.46 ▼5.4565.61 ▲22.96
Logs /wp-admin/admin.php?page=twitter-auto-publish-log1,1201.8723.1548.94
About /wp-admin/admin.php?page=twitter-auto-publish-about2,1671.7125.1347.04
Suggest a Feature /wp-admin/admin.php?page=twitter-auto-publish-suggest-features1,1051.7324.7144.37
Settings /wp-admin/admin.php?page=twitter-auto-publish-settings1,6751.8427.61115.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • xyz_smap_free_enforce_twitter_cards
    • xyz_credit_link
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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 fix the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\Config' not found in wp-content/plugins/twitter-auto-publish/vendor/abraham/twitteroauth/src/TwitterOAuth.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Abraham\\TwitterOAuth\\SignatureMethod' not found in wp-content/plugins/twitter-auto-publish/vendor/abraham/twitteroauth/src/HmacSha1.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

twitter-auto-publish/twitter-auto-publish.php 92% from 13 tests

"WP Twitter Auto Publish" version 1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 225 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin11,852 lines of code in 50 files:
LanguageFilesBlank linesComment linesLines of code
PHP387911,2535,531
PO File92,1152,2325,531
CSS11997616
JSON100151
JavaScript14023

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity15.06
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods137
▷ Static methods3827.74%
▷ Public methods10979.56%
▷ Protected methods10.73%
▷ Private methods2719.71%
Functions40
▷ Named functions3587.50%
▷ Anonymous functions512.50%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ 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
23 PNG files occupy 0.08MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/activate.png2.79KB1.53KB▼ 44.97%
images/cross.png0.75KB0.65KB▼ 12.83%
images/support.png0.71KB0.80KB0.00%
images/pause.png6.80KB4.51KB▼ 33.71%
images/linkedin.png0.87KB0.87KB0.00%