10% seo-friendly-images-for-wp

Code Review | SEO Friendly Images

WordPress plugin SEO Friendly Images scored10%from 54 tests.

About plugin

  • Plugin page: seo-friendly-imag...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2016
  • Latest release: Mar 17, 2016
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: optimalplugins (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /11,534 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/seo-friendly-images-for-wp/seo-friendly-images.php+48
    Use of undefined constant is_admin - assumed 'is_admin' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.38MB] [CPU: ▼60.02ms] Passed 4 tests

A check of server-side resources used by SEO Friendly Images
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.62 ▼0.847.11 ▼33.88
Dashboard /wp-admin2.64 ▼0.719.07 ▼56.35
Posts /wp-admin/edit.php2.64 ▼0.727.90 ▼48.40
Add New Post /wp-admin/post-new.php2.64 ▼3.2510.06 ▼101.46
Media Library /wp-admin/upload.php2.64 ▼0.598.02 ▼27.44

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by SEO Friendly Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9114.47 ▲0.091.85 ▼0.0349.35 ▲5.66
Dashboard /wp-admin2,230 ▲305.80 ▼0.06100.12 ▼5.8638.75 ▼2.77
Posts /wp-admin/edit.php2,115 ▲152.01 ▼0.0441.09 ▼1.0736.20 ▼2.40
Add New Post /wp-admin/post-new.php45 ▼1,4860.44 ▼23.100.08 ▼673.829.25 ▼47.15
Media Library /wp-admin/upload.php1,409 ▲94.24 ▲0.02102.06 ▲4.2971.57 ▲27.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/seo-friendly-images-for-wp/seo-friendly-images.php+48
    Use of undefined constant is_admin - assumed 'is_admin' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The primary PHP file in "SEO Friendly Images" version 1.1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("seo-friendly-images-for-wp.php" instead of "seo-friendly-images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,819 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43562831,819

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity87.80
▷ Minimum class complexity23.00
▷ Maximum class complexity197.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods106
▷ Static methods32.83%
▷ Public methods8782.08%
▷ Protected methods1615.09%
▷ Private methods32.83%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants22100.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
There were not PNG files found in your plugin