79% zaki-like-dislike-comments

Code Review | Zaki Like Dislike Comments

WordPress plugin Zaki Like Dislike Comments scored79%from 54 tests.

About plugin

  • Plugin page: zaki-like-dislike...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 6.3.1
  • First release: Jun 10, 2013
  • Latest release: Feb 6, 2015
  • Number of updates: 4
  • Update frequency: every 151.5 days
  • Top authors: r.conte (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /4,958 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Zaki Like Dislike Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.30 ▼4.81
Dashboard /wp-admin3.39 ▲0.0846.77 ▲1.26
Posts /wp-admin/edit.php3.50 ▲0.1447.51 ▼0.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.79 ▼19.43
Media Library /wp-admin/upload.php3.31 ▲0.0834.62 ▼1.89
Zaki Plugins /wp-admin/admin.php?page=zaki3.2526.96
Like Dislike Comments /wp-admin/admin.php?page=zaki-like-dislike3.2529.83

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: 1 new table, 7 new options
New tables
wp_zaki_like_dislike_comments
New WordPress options
can_compress_scripts
widget_theysaidso_widget
zaki_like_dislike_options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Zaki Like Dislike Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16813.75 ▼0.645.17 ▲3.4440.04 ▼4.06
Dashboard /wp-admin2,231 ▲465.83 ▲0.04102.90 ▲3.2478.34 ▲39.34
Posts /wp-admin/edit.php2,117 ▲312.03 ▲0.0438.14 ▼0.0734.35 ▲1.92
Add New Post /wp-admin/post-new.php1,543 ▲123.24 ▲4.54749.61 ▲138.4758.34 ▲6.74
Media Library /wp-admin/upload.php1,416 ▲284.23 ▲0.03106.30 ▲2.2144.82 ▲0.46
Zaki Plugins /wp-admin/admin.php?page=zaki8062.0223.2624.46
Like Dislike Comments /wp-admin/admin.php?page=zaki-like-dislike8852.0223.4635.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • zaki_like_dislike_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=zaki
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ZakiPlugins::zakiPluginsMainPageHtml() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=zaki-like-dislike
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=zaki-like-dislike
    • > 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/zaki-like-dislike-comments/zaki-like-dislike-comments.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zaki-like-dislike-comments/ajax/ajax-zaki-like-dislike.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zaki-like-dislike-comments/js/js-zaki-like-dislike.php: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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: rate, vote, comments, dislike, posts...

zaki-like-dislike-comments/zaki-like-dislike-comments.php Passed 13 tests

The principal PHP file in "Zaki Like Dislike Comments" v. 1.2 is loaded by WordPress automatically on each request
46 characters long description:
Add a like / dislike rate system for comments

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
Everything looks great! No dangerous files found in this plugin462 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP58247442
CSS13020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity13.50
▷ Minimum class complexity8.00
▷ Maximum class complexity19.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods17
▷ Static methods1588.24%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/down.png1.75KB1.45KB▼ 16.92%
images/zaki-icon.png0.34KB0.31KB▼ 9.12%
images/up.png1.78KB1.44KB▼ 18.87%