73% jl-like-pro

Code Review | JL Like Pro

WordPress plugin JL Like Pro scored 73% from 54 tests.

About plugin

  • Plugin page: jl-like-pro
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.6.0
  • WordPress version: 5.9.2
  • First release: Nov 26, 2015
  • Latest release: Aug 26, 2016
  • Number of updates: 12
  • Update frequency: every 22.8 days
  • Top authors: wordline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,682 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.09MB] [CPU: ▼339.30ms] Passed 4 tests

A check of server-side resources used by JL Like Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0345.80 ▼8.41
Dashboard /wp-admin3.24 ▼0.1718.83 ▼20.11
Posts /wp-admin/edit.php3.24 ▼0.4021.15 ▼79.33
Add New Post /wp-admin/post-new.php3.24 ▼3.7319.41 ▼1,249.35
Media Library /wp-admin/upload.php3.24 ▼0.0530.58 ▲3.31
JL Like Pro /wp-admin/plugins.php?page=jl-like-pro3.2521.85

Server storage [IO: ▲0.13MB] [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: 15 new files
Database: no new tables, 1 new option
New WordPress options
jllikepro_plgn_options

Browser metrics Passed 4 tests

A check of browser resources used by JL Like Pro
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲2015.67 ▼0.025.90 ▼0.312.19 ▲0.24
Dashboard /wp-admin2,893 ▲336.14 ▲0.03120.40 ▼5.19179.68 ▲12.11
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0065.12 ▼0.38148.58 ▼3.90
Add New Post /wp-admin/post-new.php1,628 ▼4420.08 ▼1.46497.65 ▲32.23406.79 ▲230.41
Media Library /wp-admin/upload.php1,697 ▼15.51 ▼0.01156.95 ▲7.41225.95 ▲33.63
JL Like Pro /wp-admin/plugins.php?page=jl-like-pro1,9814.3077.69125.58

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 did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/jl-like-pro/includes/helper.php+298
    array_merge(): Expected parameter 2 to be an array, string given

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=jl-like-pro
    • > Warning in wp-content/plugins/jl-like-pro/includes/helper.php+298
    array_merge(): Expected parameter 2 to be an array, string given
  • 32 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=jl-like-pro
    • > Notice in wp-content/plugins/jl-like-pro/tmpl/adminform.php+356
    Trying to access array offset on value of type null

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jl-like-pro/includes/ajax.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jl-like-pro/jl-like-pro.php:34
    • > PHP Notice
      Undefined index: tpget in wp-content/plugins/jl-like-pro/includes/ajax.php on line 4
    • > PHP Notice
      Undefined index: curl in wp-content/plugins/jl-like-pro/includes/ajax.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/jl-like-pro/tmpl/adminform.php:5
    • > PHP Notice
      Undefined index: variant in wp-content/plugins/jl-like-pro/includes/ajax.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 48 tag instead of maximum 10
The official readme.txt is a good inspiration

jl-like-pro/jl-like-pro.php Passed 13 tests

"JL Like Pro" version 1.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
129 characters long description:
Help share your posts on popular social networks: VKontakte, Facebook, ok.ru, Google Plus, Twitter, LinkedIn, mail.ru, Pinterest.

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
Success! There were no dangerous files found in this plugin1,945 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP513751983
JavaScript213039745
PO File16266137
CSS11076
HTML1004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity41.00
▷ Minimum class complexity31.00
▷ Maximum class complexity51.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods1460.87%
▷ Public methods2086.96%
▷ Protected methods00.00%
▷ Private methods313.04%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/likes-bg.png0.37KB0.33KB▼ 11.26%
jllikepro.png20.08KB10.14KB▼ 49.49%
assets/images/likes-ico.png15.94KB7.51KB▼ 52.87%