84% lottiefiles

Code Review | LottieFiles - Lottie block for Gutenberg

WordPress plugin LottieFiles - Lottie block for Gutenberg scored84%from 54 tests.

About plugin

  • Plugin page: lottiefiles
  • Plugin version: 2.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: May 19, 2022
  • Latest release: Nov 28, 2023
  • Number of updates: 27
  • Update frequency: every 20.7 days
  • Top authors: lottiefile (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

6,000+ active /52,782 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.11MB] [CPU: ▼12.40ms] Passed 4 tests

Analyzing server-side resources used by LottieFiles - Lottie block for Gutenberg
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▼0.0132.62 ▼22.78
Dashboard /wp-admin3.32 ▲0.0245.84 ▼5.95
Posts /wp-admin/edit.php3.38 ▼0.4747.25 ▼11.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.95 ▼9.00
Media Library /wp-admin/upload.php3.25 ▲0.0233.89 ▲1.66

Server storage [IO: ▲17.39MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 194 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for LottieFiles - Lottie block for Gutenberg
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8514.07 ▼0.093.76 ▲2.1138.78 ▼10.35
Dashboard /wp-admin2,237 ▲605.24 ▼0.35100.59 ▲2.0542.62 ▼1.46
Posts /wp-admin/edit.php2,142 ▲422.53 ▲0.5044.72 ▲3.1735.53 ▲0.50
Add New Post /wp-admin/post-new.php6,326 ▲4,79530.34 ▲7.441,081.34 ▲460.7143.63 ▼5.73
Media Library /wp-admin/upload.php1,442 ▲424.83 ▲0.6498.25 ▼11.6641.45 ▼7.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please fix the following
  • 2× 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/lottiefiles/src/common.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lottiefiles/src/admin/settings/init.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: animations, lottie, animation, bodymovin, gutenberg

lottiefiles/host.php 92% from 13 tests

The main PHP script in "LottieFiles - Lottie block for Gutenberg" version 2.7.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lottiefiles.php" instead of "host.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
Good job! No executable or dangerous file extensions detected139,513 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
CSS831,25310108,483
YAML11,921013,717
TypeScript1451,00473512,110
JSON4003,593
JavaScript1161271,052
PHP125482292
Sass3170180
Markdown261086

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
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
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%
Functions19
▷ Named functions1473.68%
▷ Anonymous functions526.32%
Constants1
▷ Global constants1100.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.15MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/assets/images/update.png13.89KB6.05KB▼ 56.43%
src/assets/images/upsell.png70.69KB27.72KB▼ 60.79%
build/images/upsell.18ec1514.png70.69KB27.72KB▼ 60.79%