84% custom-image-attributes

Code Review | Custom Image Attributes

WordPress plugin Custom Image Attributes scored84%from 54 tests.

About plugin

  • Plugin page: custom-image-attr...
  • Plugin version: 1.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2022
  • Latest release: Dec 4, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: liveseopro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /660 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼5.81ms] Passed 4 tests

Analyzing server-side resources used by Custom Image Attributes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.77 ▼4.04
Dashboard /wp-admin3.33 ▼0.0254.58 ▼5.92
Posts /wp-admin/edit.php3.38 ▲0.0249.54 ▼6.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.47 ▼6.91
Media Library /wp-admin/upload.php3.25 ▲0.0236.86 ▲2.44
Custom Image Attributes /wp-admin/options-general.php?page=custom-image-attributes-setting3.2231.13

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Image Attributes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3614.35 ▼0.201.98 ▼0.1142.82 ▲1.91
Dashboard /wp-admin2,202 ▲225.51 ▼0.1796.62 ▲9.4842.20 ▼1.87
Posts /wp-admin/edit.php2,107 ▲41.98 ▼0.0234.27 ▼1.0834.26 ▼2.80
Add New Post /wp-admin/post-new.php1,528 ▲223.28 ▲0.55625.98 ▼48.5756.01 ▼7.01
Media Library /wp-admin/upload.php1,404 ▲44.16 ▼0.0594.35 ▼19.2243.61 ▼5.39
Custom Image Attributes /wp-admin/options-general.php?page=custom-image-attributes-setting7952.0024.4824.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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 items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-image-attributes/include/filter_images/index.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-image-attributes/include/attachment_meta/index.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-image-attributes/include/attachment_meta/index.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: speed, attribute, image, images, attributes...

custom-image-attributes/index.php 92% from 13 tests

This is the main PHP file of "Custom Image Attributes" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("custom-image-attributes.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin274 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP57685274

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.50
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.36
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods14
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin