10% animated-featured-image

Code Review | Animated Featured Image

WordPress plugin Animated Featured Image scored10%from 54 tests.

About plugin

  • Plugin page: animated-featured...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Dec 27, 2019
  • Number of updates: 6
  • Update frequency: every 296.7 days
  • Top authors: mobeen-abdullah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,882 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/animated-featured-image/class.afi-widget.php+226
    Function create_function() is deprecated

Server metrics [RAM: ▼1.84MB] [CPU: ▼54.84ms] Passed 4 tests

An overview of server-side resources used by Animated Featured Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.91 ▼32.61
Dashboard /wp-admin2.16 ▼1.145.77 ▼47.66
Posts /wp-admin/edit.php2.17 ▼1.196.25 ▼45.34
Add New Post /wp-admin/post-new.php2.17 ▼3.726.27 ▼93.76
Media Library /wp-admin/upload.php2.17 ▼1.065.94 ▼30.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Animated Featured Image
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.22 ▼0.431.79 ▼0.4448.52 ▲5.50
Dashboard /wp-admin2,192 ▲155.58 ▼0.0086.63 ▼11.1241.24 ▲4.09
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0639.65 ▼0.7435.43 ▼4.68
Add New Post /wp-admin/post-new.php1,531 ▼423.26 ▲4.77650.08 ▲29.0354.97 ▼22.49
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0194.72 ▼12.6038.85 ▼6.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/animated-featured-image/class.afi-widget.php+226
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_afi_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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)
Good news, no errors were detected

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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/animated-featured-image/afi-widget.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/animated-featured-image/class.afi-widget.php:5

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt is a good inspiration

animated-featured-image/afi-widget.php 92% from 13 tests

The main file in "Animated Featured Image" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("animated-featured-image.php" instead of "afi-widget.php")

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
There were no executable files found in this plugin343 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22333202
Bourne Shell1242968
CSS10066
Dockerfile1207

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin