89% animate-blocks

Code Review | Animate Blocks

WordPress plugin Animate Blocks scored89%from 54 tests.

About plugin

  • Plugin page: animate-blocks
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 21, 2019
  • Latest release: Mar 29, 2019
  • Number of updates: 8
  • Update frequency: every 1.0 days
  • Top authors: liip (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /3,390 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.98ms] Passed 4 tests

Analyzing server-side resources used by Animate Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.11 ▼4.50
Dashboard /wp-admin3.34 ▲0.0350.37 ▲2.63
Posts /wp-admin/edit.php3.39 ▲0.0350.68 ▲0.75
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.62 ▼7.92
Media Library /wp-admin/upload.php3.26 ▲0.0335.20 ▼0.25

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
animate-blocks_version
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Animate Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.29 ▼1.163.07 ▲0.9838.05 ▼6.90
Dashboard /wp-admin2,206 ▲155.91 ▲0.97109.35 ▲5.6841.80 ▼0.20
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0440.33 ▲0.0834.18 ▼0.43
Add New Post /wp-admin/post-new.php6,201 ▲4,68721.95 ▲4.31859.01 ▲212.2368.25 ▲11.62
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0999.08 ▼3.6944.63 ▲0.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • animate-blocks_version
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (Animate Blocks in Gutenberg editor) image not found
You can take inspiration from this readme.txt

animate-blocks/animate-blocks.php Passed 13 tests

"Animate Blocks" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
30 characters long description:
Animate your Gutenberg blocks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin547 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81914437
PHP230100103
Sass1006
CSS1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.42
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods866.67%
▷ Protected methods433.33%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.59MB with 0.43MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png600.37KB164.71KB▼ 72.57%