83% grayscale-body

Code Review | Grayscale Body

WordPress plugin Grayscale Body scored83%from 54 tests.

About plugin

  • Plugin page: grayscale-body
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2016
  • Latest release: Jun 8, 2021
  • Number of updates: 26
  • Update frequency: every 65.3 days
  • Top authors: jojoee (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /5,058 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.11ms] Passed 4 tests

Analyzing server-side resources used by Grayscale Body
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.97 ▲5.46
Dashboard /wp-admin3.36 ▲0.0249.45 ▼14.67
Posts /wp-admin/edit.php3.48 ▲0.1251.81 ▼3.11
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.94 ▼20.17
Media Library /wp-admin/upload.php3.29 ▲0.0640.87 ▲1.52
Grayscale Body /wp-admin/options-general.php?page=grayscale-body3.2533.10

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Grayscale Body: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.37 ▼0.001.68 ▼0.2441.55 ▲0.92
Dashboard /wp-admin2,199 ▲195.57 ▼0.0389.46 ▼2.8340.39 ▼4.24
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0337.26 ▼3.5032.80 ▼3.71
Add New Post /wp-admin/post-new.php1,531 ▲323.11 ▲0.15662.44 ▼24.7749.85 ▼4.61
Media Library /wp-admin/upload.php1,404 ▲44.39 ▲0.2493.42 ▼19.4041.44 ▼6.77
Grayscale Body /wp-admin/options-general.php?page=grayscale-body8852.1222.7327.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/grayscale-body/grayscale-body.php:14

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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Demo (screenshot-1.jpg)), #2 (Switcher (screenshot-2.jpg)), #3 (Theme option (screenshot-3.jpg))
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

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

This is the main PHP file of "Grayscale Body" version 1.2.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • 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 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected518 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP17478355
JavaScript1311796
CSS211067

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1773.91%
▷ Protected methods00.00%
▷ Private methods626.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected