83% lyket-like-buttons

Code Review | Lyket like buttons

WordPress plugin Lyket like buttons scored83%from 54 tests.

About plugin

  • Plugin page: lyket-like-buttons
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 21, 2021
  • Latest release: Aug 19, 2021
  • Number of updates: 14
  • Update frequency: every 9.6 days
  • Top authors: lyket (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,134 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▲5.90ms] Passed 4 tests

An overview of server-side resources used by Lyket like buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1550.49 ▲7.08
Dashboard /wp-admin3.45 ▲0.1476.49 ▲24.57
Posts /wp-admin/edit.php3.56 ▲0.2052.73 ▲3.48
Add New Post /wp-admin/post-new.php6.05 ▲0.1698.26 ▲6.07
Media Library /wp-admin/upload.php3.37 ▲0.1442.77 ▲6.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Lyket like buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11314.84 ▲0.547.38 ▲5.5751.91 ▲7.80
Dashboard /wp-admin2,233 ▲426.14 ▲0.24120.41 ▲13.8884.99 ▲42.68
Posts /wp-admin/edit.php2,136 ▲472.90 ▲0.8444.78 ▲2.9048.37 ▲13.23
Add New Post /wp-admin/post-new.php1,550 ▲13924.42 ▲6.57553.95 ▼43.79106.16 ▲53.36
Media Library /wp-admin/upload.php1,428 ▲405.44 ▲1.25102.95 ▼7.4473.27 ▲16.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lyket-like-buttons/admin/globals/index.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lyket-like-buttons/scripts/load_lyket.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lyket-like-buttons/admin/initializers/buttons.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lyket-like-buttons/scripts/load_lyket.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lyket-like-buttons/admin/form/render.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lyket-like-buttons/admin/globals/index.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lyket-like-buttons/admin/form/render.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lyket-like-buttons/app/main.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lyket-like-buttons/admin/initializers/api.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)
No browser issues were found

Optimizations

Plugin configuration 90% 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
Attributes that require attention: You can take inspiration from this readme.txt

lyket-like-buttons/lyket.php 85% from 13 tests

The main file in "Lyket like buttons" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("lyket-like-buttons.php" instead of "lyket.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected906 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP128143697
JavaScript41729102
CSS113081
SVG11026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions38
▷ Named functions38100.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/menu_icon.png0.68KB0.85KB0.00%