83% animate-on-scroll

Code Review | Animate on Scroll

WordPress plugin Animate on Scroll scored83%from 54 tests.

About plugin

  • Plugin page: animate-on-scroll
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Feb 14, 2023
  • Latest release: Jul 7, 2023
  • Number of updates: 8
  • Update frequency: every 18.0 days
  • Top authors: aryadhiratara (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /4,029 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.30MB] [CPU: ▼9.23ms] Passed 4 tests

Analyzing server-side resources used by Animate on Scroll
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.3943.62 ▼2.48
Dashboard /wp-admin3.93 ▲0.3053.07 ▼15.32
Posts /wp-admin/edit.php3.98 ▲0.3051.94 ▼5.03
Add New Post /wp-admin/post-new.php6.45 ▲0.3088.16 ▼14.08
Media Library /wp-admin/upload.php3.79 ▲0.3042.10 ▲7.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Animate on Scroll: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5214.27 ▼0.112.04 ▲0.2040.62 ▼2.23
Dashboard /wp-admin2,195 ▲285.64 ▲0.0690.96 ▼16.0138.46 ▼4.98
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0540.18 ▼2.2337.46 ▼3.43
Add New Post /wp-admin/post-new.php1,554 ▲2318.49 ▼4.82637.00 ▼51.2354.47 ▼2.25
Media Library /wp-admin/upload.php1,397 ▼34.27 ▲0.06100.81 ▼8.4044.69 ▼0.51

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 6× PHP files output text when accessed directly:
    • > /wp-content/plugins/animate-on-scroll/includes/index.php
    • > /wp-content/plugins/animate-on-scroll/public/js/index.php
    • > /wp-content/plugins/animate-on-scroll/public/css/index.php
    • > /wp-content/plugins/animate-on-scroll/public/index.php
    • > /wp-content/plugins/animate-on-scroll/index.php
    • > /wp-content/plugins/animate-on-scroll/vendor/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

animate-on-scroll/plugin.php 85% from 13 tests

The main PHP script in "Animate on Scroll" version 1.0.6 is automatically included on every request by WordPress
You should first fix the following items:
  • 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: Name the main plugin file the same as the plugin slug ("animate-on-scroll.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,179 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP48454772,152
JavaScript10226
CSS1001

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 116)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity169.67
▷ Minimum class complexity122.00
▷ Maximum class complexity249.00
Average method complexity6.16
▷ Minimum method complexity1.00
▷ Maximum method complexity116.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods98
▷ Static methods22.04%
▷ Public methods8384.69%
▷ Protected methods1515.31%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.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
There were not PNG files found in your plugin