72% posts-like-dislike

Code Review | Posts Like Dislike

WordPress plugin Posts Like Dislike scored72%from 54 tests.

About plugin

  • Plugin page: posts-like-dislike
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 8, 2019
  • Latest release: Sep 18, 2023
  • Number of updates: 26
  • Update frequency: every 61.4 days
  • Top authors: Happy Coders (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

5,000+ active /60,619 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.85ms] Passed 4 tests

An overview of server-side resources used by Posts Like Dislike
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0836.68 ▲1.13
Dashboard /wp-admin3.43 ▲0.1347.32 ▲2.00
Posts /wp-admin/edit.php3.48 ▲0.1350.00 ▲7.36
Add New Post /wp-admin/post-new.php5.95 ▲0.0680.95 ▼24.80
Media Library /wp-admin/upload.php3.27 ▲0.0432.60 ▼1.74
Posts Like Dislike /wp-admin/options-general.php?page=posts-like-dislike3.3535.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 7 new options
New WordPress options
pld_settings
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Posts Like Dislike
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,058 ▲28715.64 ▲1.065.35 ▲3.4137.36 ▼2.56
Dashboard /wp-admin2,375 ▲1876.64 ▲1.74131.97 ▲26.0039.99 ▼0.70
Posts /wp-admin/edit.php2,281 ▲1923.58 ▲1.5751.22 ▲15.5131.73 ▼1.51
Add New Post /wp-admin/post-new.php1,540 ▼217.85 ▼0.35653.25 ▲20.4836.26 ▼15.76
Media Library /wp-admin/upload.php1,417 ▲264.29 ▲0.0982.40 ▼15.7043.65 ▼0.77
Posts Like Dislike /wp-admin/options-general.php?page=posts-like-dislike2,1038.76196.7570.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • pld_settings
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/posts-like-dislike/inc/classes/pld-activation.php
    • > /wp-content/plugins/posts-like-dislike/posts-like-dislike.php
    • > /wp-content/plugins/posts-like-dislike/inc/cores/like-dislike-render.php
    • > /wp-content/plugins/posts-like-dislike/inc/views/backend/pld-metabox.php
    • > /wp-content/plugins/posts-like-dislike/inc/classes/pld-admin.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-like-dislike/inc/classes/pld-init.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PLD_Library' not found in wp-content/plugins/posts-like-dislike/inc/classes/pld-hook.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/posts-like-dislike/inc/views/backend/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/posts-like-dislike/inc/views/backend/boxes/design-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/posts-like-dislike/inc/views/backend/boxes/help.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/posts-like-dislike/inc/views/frontend/dislike.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/posts-like-dislike/inc/views/frontend/like.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posts-like-dislike/inc/classes/pld-enqueue.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/posts-like-dislike/inc/views/backend/boxes/basic-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/posts-like-dislike/inc/views/backend/boxes/about-us.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=posts-like-dislike
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=posts-like-dislike
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: Screenshot #7 (Like Dislike Design Settings) image required
You can look at the official readme.txt

posts-like-dislike/posts-like-dislike.php 92% from 13 tests

The entry point to "Posts Like Dislike" version 1.1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin11,044 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS122,375445,109
SVG4004,612
PHP191564501,118
JavaScript22530203
Markdown1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods00.00%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ 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
There are no PNG files in this plugin