84% compress-png-for-wp

Code Review | Compress PNG for WP

WordPress plugin Compress PNG for WP scored84%from 54 tests.

About plugin

  • Plugin page: compress-png-for-wp
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 3, 2014
  • Latest release: Jan 21, 2015
  • Number of updates: 36
  • Update frequency: every 10.7 days
  • Top authors: geckodesigns (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

400+ active /17,649 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.07MB] [CPU: ▼0.49ms] Passed 4 tests

Analyzing server-side resources used by Compress PNG for WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.52 ▼1.37
Dashboard /wp-admin3.38 ▲0.0753.23 ▲0.29
Posts /wp-admin/edit.php3.43 ▲0.0754.34 ▲0.90
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.24 ▼1.77
Media Library /wp-admin/upload.php3.31 ▲0.0742.71 ▲5.91

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Compress PNG for WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.38 ▼0.251.97 ▲0.1243.58 ▼6.73
Dashboard /wp-admin2,195 ▲245.62 ▲0.0489.82 ▼14.3638.61 ▼4.82
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0036.68 ▼2.9930.75 ▼2.59
Add New Post /wp-admin/post-new.php1,528 ▼023.26 ▲0.18639.94 ▼90.5051.50 ▼10.53
Media Library /wp-admin/upload.php1,397 ▼34.28 ▲0.10100.78 ▼12.4442.78 ▼6.82

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/compress-png-for-wp/gecko-tiny-png-index.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 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
10 plugin tags: png, jpeg, image, images, media...

compress-png-for-wp/gecko-tiny-png-index.php 92% from 13 tests

The main PHP script in "Compress PNG for WP" version 1.3.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("compress-png-for-wp.php" instead of "gecko-tiny-png-index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin274 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18288274

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin