84% grayscale-images

Code Review | Grayscale Images

WordPress plugin Grayscale Images scored84%from 54 tests.

About plugin

  • Plugin page: grayscale-images
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2015
  • Latest release: Oct 29, 2023
  • Number of updates: 4
  • Update frequency: every 740.5 days
  • Top authors: Amieiro (75%)fontethemes (50%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,291 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.74ms] Passed 4 tests

Analyzing server-side resources used by Grayscale Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.01 ▼4.21
Dashboard /wp-admin3.31 ▼0.0446.29 ▼17.65
Posts /wp-admin/edit.php3.36 ▲0.0042.39 ▼6.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.93 ▼14.16
Media Library /wp-admin/upload.php3.23 ▲0.0034.80 ▼1.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Grayscale Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.24 ▼0.131.69 ▲0.1043.69 ▲0.31
Dashboard /wp-admin2,198 ▲215.63 ▼0.0387.29 ▼14.3938.45 ▼0.36
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0733.16 ▼6.7735.94 ▼0.14
Add New Post /wp-admin/post-new.php1,526 ▼223.08 ▼0.03685.30 ▼6.1153.25 ▼6.11
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.0595.39 ▼4.1344.10 ▼0.60

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grayscale-images/grayscale-images.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

grayscale-images/grayscale-images.php 92% from 13 tests

Analyzing the main PHP file in "Grayscale Images" version 2.0.0
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

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 plugin11 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1006
PHP16125

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin