78% likes-posts-comments

Code Review | Like Posts & Comments

WordPress plugin Like Posts & Comments scored78%from 54 tests.

About plugin

  • Plugin page: likes-posts-comments
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Feb 13, 2013
  • Latest release: Feb 15, 2013
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: Aurelien (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.55ms] Passed 4 tests

A check of server-side resources used by Like Posts & Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0350.52 ▲10.16
Dashboard /wp-admin3.34 ▼0.0048.53 ▼18.89
Posts /wp-admin/edit.php3.45 ▲0.1055.01 ▲1.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0497.73 ▼2.08
Media Library /wp-admin/upload.php3.26 ▲0.0437.04 ▼2.58
Likes Posts & Comments /wp-admin/options-general.php?page=likes_options_page3.2131.76

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: 2 new tables, 10 new options
New tables
wp_likes_comments
wp_likes_posts
New WordPress options
theysaidso_admin_options
widget_recent-posts
like_comment_label_1
unlike_post_label_1
db_upgraded
like_post_label_1
can_compress_scripts
unlike_comment_label_1
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Like Posts & Comments: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲16613.66 ▼0.588.11 ▲6.3141.65 ▼1.52
Dashboard /wp-admin2,222 ▲165.90 ▼0.00115.30 ▲12.5237.73 ▼5.88
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0139.80 ▼0.1536.27 ▲1.43
Add New Post /wp-admin/post-new.php1,548 ▲2223.12 ▲5.56662.84 ▼34.3755.52 ▼0.08
Media Library /wp-admin/upload.php1,398 ▼24.23 ▲0.00106.45 ▼0.7845.28 ▼3.23
Likes Posts & Comments /wp-admin/options-general.php?page=likes_options_page8432.0426.3331.39

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
  • The uninstall procedure has failed, leaving 10 options in the database
    • unlike_post_label_1
    • like_post_label_1
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • like_comment_label_1
    • widget_theysaidso_widget
    • unlike_comment_label_1

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=likes_options_page
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=likes_options_page
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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 fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/likes-posts-comments/likes-posts-comments.php:33
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/likes-posts-comments/likes-posts-comments.php on line 26

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: Contributors not specified
  • Donate link: Invalid url: ""
  • Contributors: The plugin tags were not defined
You can look at the official readme.txt

likes-posts-comments/likes-posts-comments.php Passed 13 tests

Analyzing the main PHP file in "Like Posts & Comments" version 1.1
64 characters long description:
Add a button for like any post (or custom post type) and comment

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected622 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP49472507
JavaScript110866
PO File1296049

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity17.50
▷ Minimum class complexity9.00
▷ Maximum class complexity26.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods2887.50%
▷ Protected methods00.00%
▷ Private methods412.50%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin