64% images-advanced-settings

Code Review | Images Advanced Settings

WordPress plugin Images Advanced Settings scored64%from 54 tests.

About plugin

  • Plugin page: images-advanced-s...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.0
  • WordPress version: 6.3.1
  • First release: Nov 6, 2018
  • Latest release: Dec 16, 2018
  • Number of updates: 8
  • Update frequency: every 5.0 days
  • Top authors: keylies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /656 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Images Advanced Settings
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0235.86 ▼5.41
Dashboard /wp-admin3.43 ▲0.1347.43 ▼3.49
Posts /wp-admin/edit.php3.55 ▲0.1946.51 ▲1.88
Add New Post /wp-admin/post-new.php6.01 ▲0.1292.38 ▼7.67
Media Library /wp-admin/upload.php3.36 ▲0.1237.67 ▲2.16
Images (advanced) /wp-admin/options-general.php?page=image-settings3.3632.83

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
images_advanced_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Images Advanced Settings
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.26 ▼1.041.56 ▼0.1138.56 ▼10.93
Dashboard /wp-admin2,210 ▲225.86 ▲0.95105.44 ▲4.4139.65 ▼2.38
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0138.94 ▲1.2234.47 ▲5.05
Add New Post /wp-admin/post-new.php1,539 ▼323.43 ▲4.97657.83 ▲2.0869.10 ▲8.24
Media Library /wp-admin/upload.php1,386 ▼24.26 ▲0.0797.47 ▼4.2244.66 ▲2.15
Images (advanced) /wp-admin/options-general.php?page=image-settings1,1412.0727.6227.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/images-advanced-settings/uninstall.php+5
    Undefined index: plugin
  • This plugin has failed uninstalling correctly, leaving 34 files (0.21MB) in the plugin directory
    • (new file) admin/includes/class-ias-admin-optimizations.php
    • (new file) README.txt
    • (new file) admin/includes/class-ias-admin-attachments.php
    • (new file) admin/css/ias-admin.css
    • (new file) LICENSE.txt
    • (new file) admin/images/success.svg
    • (new file) admin/includes/class-ias-admin-helpers.php
    • (new file) admin/class-ias-admin.php
    • (new file) admin/images/error.svg
    • (new file) admin/includes/class-ias-admin-sizes.php
    • ...
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • images_advanced_settings
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/images-advanced-settings/admin/views/ias-admin-section-sizes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/images-advanced-settings/admin/views/ias-admin-section-regeneration.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/images-advanced-settings/admin/views/ias-admin-page.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/images-advanced-settings/admin/views/ias-admin-part-custom-sizes.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/images-advanced-settings/admin/views/ias-admin-section-optimization.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_attachment_image() in wp-content/plugins/images-advanced-settings/admin/views/ias-admin-part-log.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Default sizes disabling), #2 (Add and update your custom sizes), #3 (Regenerate your images), #4 (Inject Lazy loading script)
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

images-advanced-settings/images-advanced-settings.php Passed 13 tests

This is the main PHP file of "Images Advanced Settings" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
63 characters long description:
Additional settings for images as custom sizes or regeneration.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,560 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP16232272832
JavaScript39611360
PO File16570168
CSS1270124
SVG20276

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.38
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods59
▷ Static methods1118.64%
▷ Public methods3559.32%
▷ Protected methods00.00%
▷ Private methods2440.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png39.71KB17.63KB▼ 55.62%
screenshot-2.png29.03KB13.22KB▼ 54.45%
screenshot-1.png19.39KB8.96KB▼ 53.80%
screenshot-4.png8.77KB4.85KB▼ 44.71%