83% animated-buttons

Code Review | Animated Buttons

WordPress plugin Animated Buttons scored83%from 54 tests.

About plugin

  • Plugin page: animated-buttons
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Apr 26, 2020
  • Latest release: Apr 26, 2020
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: baswaniyash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /709 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.89ms] Passed 4 tests

An overview of server-side resources used by Animated Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.0349.84 ▲1.28
Dashboard /wp-admin3.60 ▼0.0453.25 ▼11.02
Posts /wp-admin/edit.php3.71 ▲0.0352.62 ▲2.75
Add New Post /wp-admin/post-new.php6.20 ▲0.0597.43 ▼10.58
Media Library /wp-admin/upload.php3.52 ▲0.0337.25 ▼3.25
how to use /wp-admin/admin.php?page=abby-how-to-use3.4934.06
Animated Buttons Shortcodes /wp-admin/admin.php?page=abby-settings3.4935.38

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Animated Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,995 ▲23413.53 ▼0.8312.11 ▲9.5143.76 ▼0.99
Dashboard /wp-admin2,227 ▲505.71 ▲0.1194.29 ▲1.3338.97 ▼2.98
Posts /wp-admin/edit.php2,129 ▲292.07 ▲0.0840.14 ▼1.1536.94 ▼1.06
Add New Post /wp-admin/post-new.php1,563 ▲3223.31 ▲0.23643.96 ▲36.3653.69 ▲0.59
Media Library /wp-admin/upload.php1,423 ▲264.25 ▼0.07101.07 ▼7.7343.80 ▼0.39
how to use /wp-admin/admin.php?page=abby-how-to-use8472.0426.3833.24
Animated Buttons Shortcodes /wp-admin/admin.php?page=abby-settings9122.0726.9543.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/animated-buttons/Animated_Buttons.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/animated-buttons/inc/settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

animated-buttons/Animated_Buttons.php 85% from 13 tests

The main PHP file in "Animated Buttons" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 198 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("animated-buttons.php" instead of "Animated_Buttons.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin752 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS2180478
PHP22432213
JavaScript317661

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/animated-buttons.png35.09KB34.11KB▼ 2.77%