84% grainy-gradient-block

Code Review | Grainy Gradient Block

WordPress plugin Grainy Gradient Block scored84%from 54 tests.

About plugin

  • Plugin page: grainy-gradient-b...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.9.0
  • WordPress version: 6.3.1
  • First release: Jan 7, 2022
  • Latest release: Jan 7, 2022
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: ryelle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,034 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Grainy Gradient Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.98 ▲0.88
Dashboard /wp-admin3.32 ▲0.0151.93 ▲1.49
Posts /wp-admin/edit.php3.37 ▲0.0148.40 ▲1.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.38 ▼7.27
Media Library /wp-admin/upload.php3.24 ▲0.0135.54 ▼2.88

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Grainy Gradient Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.32 ▼0.071.91 ▲0.1943.35 ▲0.96
Dashboard /wp-admin2,195 ▲155.52 ▼0.1589.46 ▼4.6843.70 ▲3.23
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0534.78 ▼1.0638.24 ▲1.94
Add New Post /wp-admin/post-new.php6,364 ▲4,83827.63 ▲4.78920.29 ▲248.9660.82 ▲7.43
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.04103.60 ▼5.6249.46 ▲6.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
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/grainy-gradient-block/grainy-gradient.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
3 plugin tags: spacer, block, gradient

grainy-gradient-block/grainy-gradient.php 85% from 13 tests

The main PHP script in "Grainy Gradient Block" version 1.0.1 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("grainy-gradient-block.php" instead of "grainy-gradient.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.8.0" instead of "5.8")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected416 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript92128332
JSON20063
Sass12014
PHP21166
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued 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 are no PNG files in this plugin