83% animations-by-imoptimal

Code Review | Animations by Imoptimal

WordPress plugin Animations by Imoptimal scored83%from 54 tests.

About plugin

  • Plugin page: animations-by-imo...
  • Plugin version: 1.7.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 25, 2019
  • Latest release: Oct 31, 2020
  • Number of updates: 35
  • Update frequency: every 8.9 days
  • Top authors: imoptimal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.22ms] Passed 4 tests

Server-side resources used by Animations by Imoptimal
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1041.91 ▼0.76
Dashboard /wp-admin3.43 ▲0.1248.45 ▼4.43
Posts /wp-admin/edit.php3.54 ▲0.1855.16 ▲8.63
Add New Post /wp-admin/post-new.php6.01 ▲0.1297.23 ▼8.32
Media Library /wp-admin/upload.php3.35 ▲0.1238.52 ▲4.64
Animations by Imoptimal /wp-admin/options-general.php?page=imoanim_animations3.3234.88

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Animations by Imoptimal: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.78 ▼0.447.75 ▲6.0340.36 ▼5.49
Dashboard /wp-admin2,210 ▲195.85 ▼0.07101.20 ▼1.0838.92 ▼2.94
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.0239.48 ▲2.9136.31 ▲4.61
Add New Post /wp-admin/post-new.php1,548 ▲2018.77 ▼4.45587.40 ▼80.3066.88 ▲4.72
Media Library /wp-admin/upload.php1,395 ▲44.24 ▼0.0199.34 ▼3.0142.87 ▼4.48
Animations by Imoptimal /wp-admin/options-general.php?page=imoanim_animations1,9211.7026.5754.50

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
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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)
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/animations-by-imoptimal/inc/register-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/animations-by-imoptimal/inc/enqueue-resources.php:3

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

readme.txt Passed 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
7 plugin tags: animatecss, animation, css animation, on scroll animation, viewport...

animations-by-imoptimal/imoptimal-animation.php 77% from 13 tests

This is the main PHP file of "Animations by Imoptimal" version 1.7.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("animations-by-imoptimal.php" instead of "imoptimal-animation.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Description: Please don't use more than 140 characters for the plugin description (currently 425 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin4,056 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS2593243,279
PHP611839615
JavaScript43220162

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods1100.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/imoptimal-logo-white.png7.83KB4.28KB▼ 45.33%