10% just-likes-and-dislikes

Code Review | Just Likes and Dislikes

WordPress plugin Just Likes and Dislikes scored10%from 54 tests.

About plugin

  • Plugin page: just-likes-and-di...
  • Plugin version: 2.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Dec 3, 2023
  • Number of updates: 14
  • Update frequency: every 22.8 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /812 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_meta was called incorrectly. When registering a default meta value the data must match the type provided. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)

Server metrics [RAM: ▲0.36MB] [CPU: ▲0.40ms] Passed 4 tests

This is a short check of server-side resources used by Just Likes and Dislikes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3537.73 ▼5.07
Dashboard /wp-admin3.71 ▲0.4053.49 ▲3.78
Posts /wp-admin/edit.php3.76 ▲0.4154.28 ▲8.17
Add New Post /wp-admin/post-new.php6.25 ▲0.3687.11 ▲1.32
Media Library /wp-admin/upload.php3.54 ▲0.3135.32 ▲1.56
Just Likes and Dislikes /wp-admin/options-general.php?page=just-likes-and-dislikes3.6038.85

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
jlad_settings
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Just Likes and Dislikes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,075 ▲28815.53 ▲1.255.55 ▲3.7237.45 ▼6.90
Dashboard /wp-admin2,366 ▲1896.41 ▲0.70121.44 ▲20.4141.56 ▼2.33
Posts /wp-admin/edit.php2,368 ▲2653.53 ▲1.5058.45 ▲14.8946.17 ▲5.75
Add New Post /wp-admin/post-new.php6,282 ▲4,75626.38 ▲3.29904.19 ▲311.6739.84 ▼23.36
Media Library /wp-admin/upload.php1,428 ▲254.24 ▲0.0789.84 ▼10.7642.36 ▼1.44
Just Likes and Dislikes /wp-admin/options-general.php?page=just-likes-and-dislikes2,0053.3964.6753.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • jlad_settings
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/just-likes-and-dislikes/just-likes-and-dislikes.php
    • > /wp-content/plugins/just-likes-and-dislikes/inc/cores/like-dislike-render.php
    • > /wp-content/plugins/just-likes-and-dislikes/inc/classes/class-jlad-activation.php
    • > /wp-content/plugins/just-likes-and-dislikes/inc/views/backend/metabox.php
    • > /wp-content/plugins/just-likes-and-dislikes/inc/cores/count-table-render.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/just-likes-and-dislikes/inc/views/frontend/like.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/just-likes-and-dislikes/inc/views/backend/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/just-likes-and-dislikes/inc/views/backend/boxes/about.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'JLAD_Library' not found in wp-content/plugins/just-likes-and-dislikes/inc/classes/class-jlad-ajax.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/just-likes-and-dislikes/inc/classes/class-jlad-init.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/just-likes-and-dislikes/inc/classes/class-jlad-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'JLAD_Library' not found in wp-content/plugins/just-likes-and-dislikes/inc/classes/class-jlad-hook.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/just-likes-and-dislikes/inc/views/frontend/comment-like-dislike-html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/just-likes-and-dislikes/inc/views/frontend/post-like-dislike-html.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/just-likes-and-dislikes/inc/views/frontend/dislike.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: dislike, comments, pages, like, posts

just-likes-and-dislikes/just-likes-and-dislikes.php Passed 13 tests

The main PHP script in "Just Likes and Dislikes" version 2.5.1 is automatically included on every request by WordPress
55 characters long description:
A simple plugin to add likes and dislikes to WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected14,990 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
CSS205,7859913,204
PHP203353961,666
JavaScript21726119
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity26.50
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods59
▷ Static methods00.00%
▷ Public methods5898.31%
▷ Protected methods00.00%
▷ Private methods11.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There were not PNG files found in your plugin