10% seo-image

Code Review | SEO Friendly Images

WordPress plugin SEO Friendly Images scored10%from 54 tests.

About plugin

  • Plugin page: seo-image
  • Plugin version: 3.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.1
  • WordPress version: 6.3.1
  • First release: Mar 4, 2008
  • Latest release: Jan 2, 2015
  • Number of updates: 58
  • Update frequency: every 43.0 days
  • Top authors: freediver (100%)

Code review

54 tests

User reviews

60 reviews

Install metrics

30,000+ active /1,871,487 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
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/seo-image/seo-friendly-images.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; SEOFriendlyImages has a deprecated constructor

Server metrics [RAM: ▼1.50MB] [CPU: ▼52.37ms] Passed 4 tests

A check of server-side resources used by SEO Friendly Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.49 ▼0.985.71 ▼31.29
Dashboard /wp-admin2.51 ▼0.807.42 ▼45.95
Posts /wp-admin/edit.php2.51 ▼0.856.44 ▼40.20
Add New Post /wp-admin/post-new.php2.51 ▼3.386.94 ▼92.03
Media Library /wp-admin/upload.php2.51 ▼0.727.62 ▼22.72
Settings /wp-admin/admin.php?page=sfi_settings2.517.00
About /wp-admin/admin.php?page=sfi_about2.518.24

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

Analyzing filesystem and database footprints of this plugin
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_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by SEO Friendly Images
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.34 ▲0.171.66 ▼0.0143.16 ▼0.39
Dashboard /wp-admin2,224 ▲445.51 ▼0.1882.19 ▼6.3781.16 ▲38.94
Posts /wp-admin/edit.php2,126 ▲261.99 ▼0.0236.89 ▼1.8333.67 ▼2.04
Add New Post /wp-admin/post-new.php1,701 ▲17522.54 ▼0.51667.94 ▼7.7040.20 ▼18.04
Media Library /wp-admin/upload.php1,423 ▲234.24 ▲0.03100.33 ▼2.3577.95 ▲33.93
Settings /wp-admin/admin.php?page=sfi_settings1,0282.0224.6838.40
About /wp-admin/admin.php?page=sfi_about8582.0423.1228.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/seo-image/seo-friendly-images.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; SEOFriendlyImages has a deprecated constructor
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sfi_about
    • > Deprecated in wp-content/plugins/seo-image/seo-friendly-images.class.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; SEOFriendlyImages has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sfi_about
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sfi_about
    • > 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/seo-image/seo-friendly-images.class.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

seo-image/seo-friendly-images.php 92% from 13 tests

The entry point to "SEO Friendly Images" version 3.0.5 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("seo-image.php" instead of "seo-friendly-images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,218 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP210829844
PO File397340234
JavaScript2155140

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity196.00
▷ Minimum class complexity196.00
▷ Maximum class complexity196.00
Average method complexity11.26
▷ Minimum method complexity1.00
▷ Maximum method complexity87.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
i/arrows.png0.48KB0.24KB▼ 50.81%
i/seosmart125.png16.56KB6.04KB▼ 63.51%
i/mwp250_2.png22.54KB21.97KB▼ 2.52%
i/icon.png1.50KB0.76KB▼ 49.22%
i/logo.png2.66KB1.51KB▼ 43.40%