94% r-animated-icon

Code Review | R Animated Icon Plugin

WordPress plugin R Animated Icon Plugin scored 94% from 54 tests.

About plugin

  • Plugin page: r-animated-icon
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-5.8.1
  • WordPress version: 5.8.1
  • First release: Sep 14, 2021
  • Latest release: Sep 15, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: mascotdevelopers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 121 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.21MB] [CPU: ▼157.92ms] Passed 4 tests

Analyzing server-side resources used by R Animated Icon Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1437.05 ▲16.15
Dashboard /wp-admin2.86 ▼0.2026.10 ▼24.93
Posts /wp-admin/edit.php2.98 ▼0.1332.64 ▼13.21
Add New Post /wp-admin/post-new.php4.99 ▼0.4574.16 ▼580.96
Media Library /wp-admin/upload.php2.95 ▼0.0623.91 ▼12.56

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by R Animated Icon Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲9116.27 ▲0.6914.21 ▲5.5748.13 ▼2.50
Dashboard /wp-admin2,969 ▲355.89 ▼0.11137.32 ▼6.40111.62 ▼2.40
Posts /wp-admin/edit.php2,741 ▲52.84 ▲0.1262.73 ▼0.6491.81 ▼5.03
Add New Post /wp-admin/post-new.php1,606 ▲10818.56 ▼0.26371.43 ▼11.48108.34 ▼0.48
Media Library /wp-admin/upload.php1,812 ▲25.13 ▲0.07142.07 ▼2.46122.31 ▲6.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/r-animated-icon/modules/default/templates/_r_default_animated_icon_template.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/r-animated-icon/modules/default/_r_default_animated_icon.php:13
    • > PHP Notice
      Undefined variable: r_animated_icon_file in wp-content/plugins/r-animated-icon/modules/default/templates/_r_default_animated_icon_template.php on line 4
    • > PHP Notice
      Undefined variable: css_class in wp-content/plugins/r-animated-icon/modules/default/templates/_r_default_animated_icon_template.php on line 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)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed: You can look at the official readme.txt

r-animated-icon/r-animated-icon.php 92% from 13 tests

The main PHP file in "R Animated Icon Plugin" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 plugin156 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP31219119
JavaScript24030
CSS1006
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-128x128.png19.24KB7.99KB▼ 58.48%