10% prolike-button

Code Review | Pro Like Button

WordPress plugin Pro Like Button scored10%from 54 tests.

About plugin

  • Plugin page: prolike-button
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2018
  • Latest release: Oct 24, 2020
  • Number of updates: 24
  • Update frequency: every 35.2 days
  • Top authors: protport4991 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,530 total downloads


Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/prolike-button/front-likes.php+162
    Trying to access array offset on value of type null

Server metrics [RAM: ▼0.05MB] [CPU: ▼8.88ms] Passed 4 tests

Analyzing server-side resources used by Pro Like Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▼0.5618.89 ▼22.38
Dashboard /wp-admin3.45 ▲0.1054.59 ▼4.61
Posts /wp-admin/edit.php3.56 ▲0.2151.30 ▲6.52
Add New Post /wp-admin/post-new.php6.02 ▲0.1487.66 ▼10.90
Media Library /wp-admin/upload.php3.34 ▲0.1237.08 ▲2.39

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 32 new files
Database: 1 new table, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pro Like Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,185 ▲43916.41 ▲2.045.94 ▲3.9943.05 ▼2.75
Dashboard /wp-admin2,466 ▲2787.31 ▲2.40138.47 ▲22.8198.06 ▲53.10
Posts /wp-admin/edit.php2,405 ▲3164.06 ▲2.0054.26 ▲17.2036.14 ▲4.06
Add New Post /wp-admin/post-new.php1,875 ▲35623.75 ▲0.60676.49 ▲3.6737.28 ▼24.46
Media Library /wp-admin/upload.php1,478 ▲935.40 ▲1.21110.20 ▲0.7595.09 ▲49.83

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/prolike-button/front-likes.php on line 159
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/prolike-button/index.php:18
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/prolike-button/front-likes.php:160
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prolike-button/include/enqueue-front.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/prolike-button/include/enqueue-admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/prolike-button/admin_post_field.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side


Plugin configuration 90% 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
These attributes need to be fixed:
  • Tags: There are too many tags (25 tag instead of maximum 10)
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in prolike-button/assets to your readme.txt
The official readme.txt might help

prolike-button/index.php 92% from 13 tests

"Pro Like Button" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("prolike-button.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,456 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions26100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
12 PNG files occupy 0.17MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon_button/image3.png16.29KB0.83KB▼ 94.90%
assets/img/icon_button/image9.png17.44KB1.32KB▼ 92.46%
assets/img/icon_button/image5.png16.60KB1.14KB▼ 93.15%
assets/img/icon_button/image8.png18.43KB2.28KB▼ 87.64%
assets/img/icon_button/image6.png17.73KB1.67KB▼ 90.55%