10% wp-tweet-plus

Code Review | WP Tweet Plus

WordPress plugin WP Tweet Plus scored 10% from 54 tests.

About plugin

  • Plugin page: wp-tweet-plus
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 5.8.1
  • First release: Feb 5, 2015
  • Latest release: Jun 12, 2015
  • Number of updates: 11
  • Update frequency: every 11.5 days
  • Top authors: amirk27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 4,166 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5211
    get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

Server metrics [RAM: ▲0.10MB] [CPU: ▼171.05ms] Passed 4 tests

A check of server-side resources used by WP Tweet Plus
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.93 ▲0.1038.67 ▼4.87
Dashboard /wp-admin3.16 ▲0.1059.06 ▲19.18
Posts /wp-admin/edit.php3.21 ▲0.1052.46 ▲4.94
Add New Post /wp-admin/post-new.php5.53 ▲0.0999.43 ▼684.67
Media Library /wp-admin/upload.php3.10 ▲0.1037.15 ▲0.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 11 new files
Database: 1 new table, 1 new option
New tables
wp_wptb
New WordPress options
jal_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for WP Tweet Plus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,706 ▲13415.96 ▲0.3511.80 ▲1.9948.96 ▼1.21
Dashboard /wp-admin2,990 ▲595.88 ▼0.18146.75 ▼8.61130.82 ▲11.91
Posts /wp-admin/edit.php2,767 ▲282.60 ▼0.1172.05 ▼8.2896.34 ▲6.95
Add New Post /wp-admin/post-new.php1,703 ▲2018.05 ▼0.74393.65 ▼35.83113.99 ▲4.05
Media Library /wp-admin/upload.php1,775 ▼325.03 ▼0.03149.18 ▼14.51141.54 ▲12.46

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • jal_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/wp-tweet-plus/wp_tweet_plus.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-tweet-plus/wp_tweet_plus.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-tweet-plus/wp_tweet_plus.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: tweets, twitter share, hashtag, tweet, pages...

wp-tweet-plus/wp_tweet_plus.php 92% from 13 tests

Analyzing the main PHP file in "WP Tweet Plus" version 1.2.3
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-tweet-plus.php" instead of "wp_tweet_plus.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
No dangerous file extensions were detected1,453 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP15821717
CSS2119599
JavaScript2134137

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/donate.png46.43KB14.78KB▼ 68.16%
images/off - Copy.png3.74KB1.14KB▼ 69.52%
images/on.png4.53KB1.75KB▼ 61.29%
images/off.png3.75KB1.07KB▼ 71.38%
images/ico.png3.08KB0.63KB▼ 79.50%