79% piio-image-optimization

Code Review | Piio - Make your Images Load Faster, Optimize Your Website & Boost Your SEO

WordPress plugin Piio - Make your Images Load Faster, Optimize Your Website & Boost Your SEO scored79%from 54 tests.

About plugin

  • Plugin page: piio-image-optimi...
  • Plugin version: 0.9.29
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2018
  • Latest release: Mar 22, 2021
  • Number of updates: 75
  • Update frequency: every 13.0 days
  • Top authors: piio (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /16,423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.44ms] Passed 4 tests

Server-side resources used by Piio - Make your Images Load Faster, Optimize Your Website & Boost Your SEO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.11 ▼0.50
Dashboard /wp-admin3.34 ▼0.0050.94 ▼14.08
Posts /wp-admin/edit.php3.46 ▲0.1047.50 ▼3.76
Add New Post /wp-admin/post-new.php5.94 ▲0.0686.35 ▼11.60
Media Library /wp-admin/upload.php3.27 ▲0.0439.05 ▼4.32

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 44 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Piio - Make your Images Load Faster, Optimize Your Website & Boost Your SEO: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6514.55 ▲0.401.76 ▲0.0446.38 ▲1.46
Dashboard /wp-admin2,232 ▲585.65 ▼0.0286.38 ▼14.7437.06 ▼5.16
Posts /wp-admin/edit.php2,138 ▲382.03 ▲0.0137.96 ▲2.4133.16 ▼1.14
Add New Post /wp-admin/post-new.php1,543 ▲1723.77 ▲0.85698.91 ▲38.0452.74 ▼4.34
Media Library /wp-admin/upload.php1,440 ▲434.23 ▲0.05100.24 ▼5.4644.40 ▼4.11

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/piio-image-optimization/admin/partials/piio-image-optimization-admin-display.php
    • > /wp-content/plugins/piio-image-optimization/trunk/admin/partials/piio-image-optimization-admin-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/piio-image-optimization/admin/partials/piio-image-optimization-admin-display.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/piio-image-optimization/trunk/admin/partials/piio-image-optimization-admin-display.php:23

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: image compression, cdn, image compressor, responsive, lazy loading...

piio-image-optimization/piio-image-optimization.php Passed 13 tests

Analyzing the main PHP file in "Piio - Make your Images Load Faster, Optimize Your Website & Boost Your SEO" version 0.9.29
64 characters long description:
Generates responsive and optimized images, so you don't have to.

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
Success! There were no dangerous files found in this plugin963 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP14188620916
JavaScript15124
CSS10518
SVG1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity17.44
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods106
▷ Static methods109.43%
▷ Public methods7066.04%
▷ Protected methods00.00%
▷ Private methods3633.96%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.00%
Constants2
▷ Global constants2100.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
No PNG files were detected