83% force-jpeg-quality

Code Review | Force jpeg quality

WordPress plugin Force jpeg quality scored83%from 54 tests.

About plugin

  • Plugin page: force-jpeg-quality
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.4
  • WordPress version: 6.3.1
  • First release: Sep 27, 2013
  • Latest release: Dec 25, 2015
  • Number of updates: 14
  • Update frequency: every 92.8 days
  • Top authors: boluda (92.86%)unitepress (14.29%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,316 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
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.88ms] Passed 4 tests

A check of server-side resources used by Force jpeg quality
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.53 ▲0.78
Dashboard /wp-admin3.31 ▲0.0156.99 ▲3.03
Posts /wp-admin/edit.php3.36 ▲0.0051.03 ▼6.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.06 ▼16.66
Media Library /wp-admin/upload.php3.23 ▲0.0041.08 ▲2.82

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Force jpeg quality
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.29 ▼1.461.82 ▼0.1045.36 ▼4.30
Dashboard /wp-admin2,221 ▲185.88 ▲0.97102.06 ▼2.2341.77 ▼1.51
Posts /wp-admin/edit.php2,103 ▼02.01 ▲0.0337.05 ▼6.5536.36 ▲0.96
Add New Post /wp-admin/post-new.php1,554 ▲922.80 ▼0.32614.75 ▼36.0969.33 ▼4.93
Media Library /wp-admin/upload.php1,400 ▼04.25 ▲0.04107.71 ▼16.1851.06 ▲2.79

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

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

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just 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 add_filter() in wp-content/plugins/force-jpeg-quality/force-jpeg-quality.php:15

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 90% 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 require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === force-jpeg-quality === )
The official readme.txt is a good inspiration

force-jpeg-quality/force-jpeg-quality.php 85% from 13 tests

The main file in "Force jpeg quality" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path is invalid: folder "/fjq/" does not exist
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin5 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12115

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin