73% wti-like-post

Code Review | WTI Like Post

WordPress plugin WTI Like Post scored73%from 54 tests.

About plugin

  • Plugin page: wti-like-post
  • Plugin version: 1.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0.1
  • WordPress version: 6.3.1
  • First release: Jan 1, 2012
  • Latest release: Jul 27, 2022
  • Number of updates: 96
  • Update frequency: every 40.2 days
  • Top authors: webtechideas (100%)

Code review

54 tests

User reviews

76 reviews

Install metrics

6,000+ active /268,734 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.37MB] [CPU: ▲1.39ms] Passed 4 tests

Analyzing server-side resources used by WTI Like Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3341.06 ▲3.37
Dashboard /wp-admin3.69 ▲0.3950.06 ▲3.68
Posts /wp-admin/edit.php3.81 ▲0.4551.81 ▲5.24
Add New Post /wp-admin/post-new.php6.27 ▲0.3985.41 ▼4.67
Media Library /wp-admin/upload.php3.61 ▲0.3936.51 ▲3.17
WTI Like Post /wp-admin/options-general.php?page=WtiLikePostAdminMenu3.5937.10

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: 1 new table, 27 new options
New tables
wp_wti_like_post
New WordPress options
widget_recent-posts
wti_like_post_title_text
wti_like_post_allowed_posts
can_compress_scripts
wti_like_post_alignment
wti_like_post_show_symbols
widget_recentlylikedpostswidget
wti_like_post_excluded_sections
wti_like_post_show_on_pages
wti_like_post_voting_period
...

Browser metrics Passed 4 tests

Checking browser requirements for WTI Like Post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲16213.53 ▼0.917.80 ▲6.1540.79 ▼4.19
Dashboard /wp-admin2,213 ▲215.83 ▲0.87106.53 ▼2.4539.81 ▼0.27
Posts /wp-admin/edit.php2,096 ▲72.00 ▼0.0141.18 ▲4.5836.06 ▲1.00
Add New Post /wp-admin/post-new.php6,243 ▲4,72921.68 ▲4.13843.40 ▲167.0656.91 ▲8.77
Media Library /wp-admin/upload.php1,389 ▲44.24 ▼0.0495.07 ▼7.7343.96 ▼0.45
WTI Like Post /wp-admin/options-general.php?page=WtiLikePostAdminMenu1,3621.8429.3229.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wti_like_post
  • The uninstall procedure has failed, leaving 27 options in the database
    • widget_mostlikedpostswidget
    • widget_recent-posts
    • can_compress_scripts
    • wti_like_post_excluded_posts
    • wti_like_post_title_text
    • wti_like_post_position
    • wti_like_post_show_dislike
    • wti_like_post_login_required
    • wti_like_post_show_symbols
    • wti_like_post_alignment
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wti-like-post/wti_like_post.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wti-like-post/wti_like_post_site.php:129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wti-like-post/wti_like_post_admin.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wti-like-post/wti_like_post_widgets.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #1, #10, #11, #12, #13, #14, #2, #3, #4, #5, #6, #7, #8, #9 in wti-like-post/assets to your readme.txt
Please take inspiration from this readme.txt

wti-like-post/wti_like_post.php 85% from 13 tests

The main PHP script in "WTI Like Post" version 1.4.6 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 734 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wti-like-post.php" instead of "wti_like_post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,726 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP52562601,434
PO File45599211,102
CSS1368152
JavaScript24138

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.75
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
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
6 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/thumb_up3.png3.74KB0.51KB▼ 86.33%
images/thumb_down2.png3.57KB0.48KB▼ 86.61%
images/thumb_down3.png3.70KB0.50KB▼ 86.55%
images/thumb_up2.png3.68KB0.50KB▼ 86.52%
images/thumb_up1.png4.15KB1.32KB▼ 68.10%