77% auto-animateimage

Code Review | Auto AnimateImage

WordPress plugin Auto AnimateImage scored77%from 54 tests.

About plugin

  • Plugin page: auto-animateimage
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.4.2
  • WordPress version: 6.3.1
  • First release: Sep 20, 2012
  • Latest release: Sep 23, 2012
  • Number of updates: 24
  • Update frequency: every 0.2 days
  • Top authors: attosoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,507 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▲0.10ms] Passed 4 tests

An overview of server-side resources used by Auto AnimateImage
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.33 ▲3.18
Dashboard /wp-admin3.46 ▲0.1647.46 ▲1.86
Posts /wp-admin/edit.php3.54 ▲0.1854.12 ▲3.02
Add New Post /wp-admin/post-new.php6.04 ▲0.1587.72 ▼7.66
Media Library /wp-admin/upload.php3.38 ▲0.1537.85 ▲5.77
Auto AnimateImage /wp-admin/options-general.php?page=auto-animateimage3.3331.24

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Auto AnimateImage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲9713.21 ▼1.102.37 ▼0.1439.96 ▼9.06
Dashboard /wp-admin2,213 ▲244.85 ▼1.08104.24 ▼14.7439.43 ▼6.99
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0640.56 ▲2.6134.24 ▼5.14
Add New Post /wp-admin/post-new.php1,540 ▲2623.30 ▲5.70670.31 ▼13.1255.61 ▼10.51
Media Library /wp-admin/upload.php1,395 ▲44.22 ▲0.0197.21 ▼4.2240.41 ▼4.75
Auto AnimateImage /wp-admin/options-general.php?page=auto-animateimage2,0172.4958.3464.52

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=auto-animateimage
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=auto-animateimage
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/auto-animateimage/animateimage.php:271

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Auto AnimateImage Settings screen) image required
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

auto-animateimage/animateimage.php 77% from 13 tests

The main PHP file in "Auto AnimateImage" ver. 0.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("auto-animateimage.php" instead of "animateimage.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin793 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP37158552
PO File15359122
CSS18761
JavaScript25758

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity19.67
▷ Minimum class complexity9.00
▷ Maximum class complexity39.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
7 PNG files occupy 0.12MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png104.06KB28.72KB▼ 72.40%
images/donate.png2.37KB1.65KB▼ 30.33%
images/wp.png3.58KB2.55KB▼ 28.70%
images/contact.png1.26KB0.82KB▼ 34.98%
images/star.png1.60KB1.53KB▼ 4.15%