78% png-to-jpg

Code Review | PNG to JPG

WordPress plugin PNG to JPG scored78%from 54 tests.

About plugin

  • Plugin page: png-to-jpg
  • Plugin version: 4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 27, 2016
  • Latest release: Oct 27, 2023
  • Number of updates: 59
  • Update frequency: every 44.4 days
  • Top authors: kubiq (100%)

Code review

54 tests

User reviews

37 reviews

Install metrics

10,000+ active /105,622 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Server-side resources used by PNG to JPG
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1638.16 ▲1.65
Dashboard /wp-admin3.53 ▲0.1842.43 ▼18.23
Posts /wp-admin/edit.php3.63 ▲0.2744.27 ▼1.59
Add New Post /wp-admin/post-new.php6.21 ▲0.3277.85 ▼13.14
Media Library /wp-admin/upload.php3.47 ▲0.2431.05 ▼2.66

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
png_to_jpg_settings
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by PNG to JPG
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲5814.54 ▼0.071.63 ▲0.0635.86 ▼6.25
Dashboard /wp-admin2,199 ▲185.54 ▼0.1282.18 ▼22.1738.70 ▼1.11
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0335.22 ▲0.5134.06 ▼4.59
Add New Post /wp-admin/post-new.php1,529 ▼223.33 ▲0.18641.35 ▼29.7953.96 ▲5.24
Media Library /wp-admin/upload.php1,407 ▲134.23 ▼0.0094.50 ▼2.3844.60 ▲0.13
PNG to JPG /wp-admin/png-to-jpg.php260.420.1114.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • png_to_jpg_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/png-to-jpg/png-to-jpg.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
    • > GET request to /wp-admin/png-to-jpg.php
    • > Network (severe)
    wp-admin/png-to-jpg.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in png-to-jpg/assets to your readme.txt
You can take inspiration from this readme.txt

png-to-jpg/png-to-jpg.php 92% from 13 tests

The principal PHP file in "PNG to JPG" v. 4.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Good job! No executable or dangerous file extensions detected863 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15640863

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity108.00
▷ Minimum class complexity108.00
▷ Maximum class complexity108.00
Average method complexity5.65
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.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
PNG images were not found in this plugin