83% xpac-lottie-interactive-animation

Code Review | XPAC Lottie Interactive Animations

WordPress plugin XPAC Lottie Interactive Animations scored83%from 54 tests.

About plugin

  • Plugin page: xpac-lottie-inter...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-5.9.1
  • WordPress version: 6.3.1
  • First release: May 3, 2022
  • Latest release: May 3, 2022
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: thexpac (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /595 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼10.23ms] Passed 4 tests

A check of server-side resources used by XPAC Lottie Interactive Animations
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.81 ▲2.30
Dashboard /wp-admin3.52 ▲0.1750.85 ▼13.08
Posts /wp-admin/edit.php3.57 ▲0.2146.33 ▼3.64
Add New Post /wp-admin/post-new.php6.04 ▲0.1582.12 ▼25.23
Media Library /wp-admin/upload.php3.38 ▲0.1534.36 ▲1.04

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for XPAC Lottie Interactive Animations
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5713.48 ▼1.1125.52 ▲24.0743.50 ▲1.33
Dashboard /wp-admin2,192 ▲175.57 ▼0.0797.46 ▼2.8642.08 ▼2.65
Posts /wp-admin/edit.php2,103 ▲31.97 ▲0.0035.12 ▼4.0330.10 ▼3.86
Add New Post /wp-admin/post-new.php6,373 ▲4,83623.16 ▲4.78916.78 ▲275.6237.13 ▼25.91
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0397.70 ▲2.7244.80 ▲1.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'XPACGroup\\Plugin\\XPACLottie\\blocks\\BaseBlock' not found in wp-content/plugins/xpac-lottie-interactive-animation/src/blocks/Lottie.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'XPACGroup\\PluginFramework\\v1_0_1\\Plugin' not found in wp-content/plugins/xpac-lottie-interactive-animation/src/Bootstrap.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'XPACGroup\\PluginFramework\\v1_0_1\\Container' not found in wp-content/plugins/xpac-lottie-interactive-animation/vendor/xpac/plugin/src/Plugin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'XPACGroup\\PluginFramework\\v1_0_1\\Container' not found in wp-content/plugins/xpac-lottie-interactive-animation/vendor/xpac/plugin/src/Component.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'XPACGroup\\Core\\v1_0_1\\Container' not found in wp-content/plugins/xpac-lottie-interactive-animation/vendor/xpac/plugin/src/Container.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'XPACGroup\\PluginFramework\\v1_0_1\\Component' not found in wp-content/plugins/xpac-lottie-interactive-animation/src/blocks/BaseBlock.php:15

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 86% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Adding Lottie Animation block in the Block editor), #2 (Chain mode controls), #3 (Scroll mode controls), #4 (Available in Widget Area and Site Editor)
The official readme.txt is a good inspiration

xpac-lottie-interactive-animation/xpac-lottie-interactive-animations.php 77% from 13 tests

The entry point to "XPAC Lottie Interactive Animations" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xpac-lottie-interactive-animation.php" instead of "xpac-lottie-interactive-animations.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)

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,602 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP213049151,379
JSON400204
YAML11617
JavaScript2022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity19.58
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes12
▷ Abstract classes541.67%
▷ Concrete classes758.33%
▷ Final classes114.29%
Methods116
▷ Static methods2118.10%
▷ Public methods9279.31%
▷ Protected methods108.62%
▷ Private methods1412.07%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin