84% seo-for-images

Code Review | SEO For Images

WordPress plugin SEO For Images scored84%from 54 tests.

About plugin

  • Plugin page: seo-for-images
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2013
  • Latest release: Apr 17, 2013
  • Number of updates: 27
  • Update frequency: every 2.4 days
  • Top authors: kasonzhao (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,539 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.03MB] [CPU: ▼10.32ms] Passed 4 tests

A check of server-side resources used by SEO For Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.62 ▼3.40
Dashboard /wp-admin3.35 ▼0.0048.71 ▼18.62
Posts /wp-admin/edit.php3.40 ▲0.0448.64 ▼2.47
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.51 ▼16.78
Media Library /wp-admin/upload.php3.27 ▲0.0437.18 ▲5.11
SEO for images /wp-admin/options-general.php?page=seo-for-images/seo-for-images.php3.2533.47

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
seo_for_images_alt
db_upgraded
can_compress_scripts
widget_recent-posts
seo_for_images_override_title
widget_recent-comments
seo_for_images_title
seo_for_images_override
theysaidso_admin_options

Browser metrics Passed 4 tests

SEO For Images: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.21 ▼0.052.07 ▲0.3942.08 ▼1.37
Dashboard /wp-admin2,199 ▲225.63 ▲0.0592.23 ▼8.7540.46 ▼4.11
Posts /wp-admin/edit.php2,104 ▲72.02 ▼0.0135.46 ▼0.5034.71 ▼0.58
Add New Post /wp-admin/post-new.php1,531 ▲523.07 ▼0.31641.30 ▼63.0153.78 ▼13.18
Media Library /wp-admin/upload.php1,407 ▲134.15 ▼0.0595.98 ▼8.3341.25 ▼4.10
SEO for images /wp-admin/options-general.php?page=seo-for-images/seo-for-images.php1,0352.1527.8528.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • seo_for_images_title
    • seo_for_images_override
    • seo_for_images_alt
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • seo_for_images_override_title
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/seo-for-images/seo-for-images.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (/screenshot-1.jpg)
You can look at the official readme.txt

seo-for-images/seo-for-images.php 92% from 13 tests

The main file in "SEO For Images" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)

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 detected255 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16628255

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
imgs/settings.png2.65KB2.21KB▼ 16.83%