84% pb-seo-friendly-images

Code Review | PB SEO Friendly Images

WordPress plugin PB SEO Friendly Images scored 84% from 54 tests.

About plugin

  • Plugin page: pb-seo-friendly-i...
  • Plugin version: 4.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 5.8.1
  • First release: Dec 13, 2016
  • Latest release: Oct 6, 2020
  • Number of updates: 39
  • Update frequency: every 38.0 days
  • Top authors: PascalBajorat (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

20,000+ active / 212,133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.21MB] [CPU: ▼146.32ms] Passed 4 tests

Server-side resources used by PB SEO Friendly Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.04 ▲0.2031.52 ▲5.54
Dashboard /wp-admin3.30 ▲0.2441.22 ▼0.93
Posts /wp-admin/edit.php3.39 ▲0.2835.00 ▼1.36
Add New Post /wp-admin/post-new.php5.64 ▲0.2075.27 ▼586.01
Media Library /wp-admin/upload.php3.22 ▲0.2127.31 ▲3.01
SEO Friendly Images /wp-admin/options-general.php?page=pb-seo-friendly-images3.2224.18

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 2 new options
New WordPress options
pb-seo-friendly-images
pb-seo-friendly-images-dbv

Browser metrics Passed 4 tests

This is an overview of browser requirements for PB SEO Friendly Images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,673 ▲7215.99 ▲0.425.17 ▼1.7577.94 ▲2.40
Dashboard /wp-admin2,940 ▲446.02 ▼0.17122.37 ▼21.63168.25 ▼6.87
Posts /wp-admin/edit.php2,750 ▲103.24 ▼0.1264.91 ▼0.27137.29 ▲2.60
Add New Post /wp-admin/post-new.php3,727 ▼8018.63 ▼0.05443.35 ▲19.35159.31 ▼4.28
Media Library /wp-admin/upload.php1,756 ▲45.49 ▼0.02144.21 ▼3.00189.03 ▼2.01
SEO Friendly Images /wp-admin/options-general.php?page=pb-seo-friendly-images2,0502.5256.22250.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • pb-seo-friendly-images-dbv

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
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/pb-seo-friendly-images/templates/options_page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
Please take inspiration from this readme.txt

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

The main PHP script in "PB SEO Friendly Images" version 4.0.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 205 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin2,714 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP103843181,778
PO File1119133435
Sass1401230
CSS221229
JavaScript115941
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity29.88
▷ Minimum class complexity4.00
▷ Maximum class complexity99.00
Average method complexity5.44
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods49
▷ Static methods12.04%
▷ Public methods4693.88%
▷ Protected methods24.08%
▷ Private methods12.04%
Functions8
▷ Named functions112.50%
▷ Anonymous functions787.50%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/warning.png20.55KB2.87KB▼ 86.03%
assets/img/icon.png7.87KB3.76KB▼ 52.20%
assets/img/check.png3.57KB2.17KB▼ 39.12%
assets/img/mailcrypt.png5.89KB2.87KB▼ 51.34%
assets/img/code.png26.40KB4.65KB▼ 82.39%