83% embed-lottie-player

Code Review | Lottie Player block - Implement Lottie animations.

WordPress plugin Lottie Player block - Implement Lottie animations. scored83%from 54 tests.

About plugin

  • Plugin page: embed-lottie-player
  • Plugin version: 1.1.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 2, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 37
  • Update frequency: every 18.1 days
  • Top authors: charlescormier (83.78%)abuhayat (18.92%)

Code review

54 tests

User reviews

4 reviews

Install metrics

4,000+ active /30,587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼5.37ms] Passed 4 tests

Server-side resources used by Lottie Player block - Implement Lottie animations.
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.21 ▼1.65
Dashboard /wp-admin3.49 ▲0.1446.61 ▼13.25
Posts /wp-admin/edit.php3.61 ▲0.2546.70 ▲2.45
Add New Post /wp-admin/post-new.php6.10 ▲0.2185.63 ▼9.02
Media Library /wp-admin/upload.php3.42 ▲0.1836.97 ▲3.81
Lottie Player - Block /wp-admin/admin.php?page=embed-lottie-player3.3736.46

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
lpb_pro-redirect
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Lottie Player block - Implement Lottie animations.
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,538 ▼1,19712.51 ▼1.8722.92 ▲21.0035.39 ▼9.09
Dashboard /wp-admin2,203 ▲155.80 ▲0.77107.88 ▼9.8942.97 ▼1.36
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0342.38 ▲5.4634.06 ▼0.27
Add New Post /wp-admin/post-new.php6,211 ▲4,67823.07 ▼0.05909.78 ▲197.0747.64 ▼19.01
Media Library /wp-admin/upload.php1,388 ▼34.27 ▼0.0096.13 ▼7.6140.05 ▼8.00
Lottie Player - Block /wp-admin/admin.php?page=embed-lottie-player7862.3051.5625.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • lpb_pro-redirect

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/embed-lottie-player/inc/CustomPost.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/embed-lottie-player/bplugins_sdk/inc/Base/Activate.php:3
    • > PHP Warning
      Use of undefined constant LPB_PLUGIN_VERSION - assumed 'LPB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/embed-lottie-player/dist/editor.asset.php on line 4
    • > PHP Warning
      Use of undefined constant LPB_PLUGIN_VERSION - assumed 'LPB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/embed-lottie-player/dist/script.asset.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'BSDK' not found in wp-content/plugins/embed-lottie-player/bplugins_sdk/inc/Base/License.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please describe screenshot #4 in embed-lottie-player/assets to your readme.txt
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

embed-lottie-player/plugin.php 85% from 13 tests

The main PHP file in "Lottie Player block - Implement Lottie animations." ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("embed-lottie-player.php" instead of "plugin.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,837 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP1313166646
JavaScript1873101507
PO File2104203239
JSON500212
Sass3115184
CSS54449

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity9.71
▷ Minimum class complexity3.00
▷ Maximum class complexity19.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods52
▷ Static methods35.77%
▷ Public methods5096.15%
▷ Protected methods00.00%
▷ Private methods23.85%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
bplugins_sdk/dist/assets/images/shield_success.png3.47KB3.61KB0.00%