83% blocks-for-discogs

Code Review | Blocks for Discogs

WordPress plugin Blocks for Discogs scored83%from 54 tests.

About plugin

  • Plugin page: blocks-for-discogs
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2022
  • Latest release: Mar 6, 2023
  • Number of updates: 5
  • Update frequency: every 34.8 days
  • Top authors: villanovachile (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /712 total downloads


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.02MB] [CPU: ▼2.84ms] Passed 4 tests

This is a short check of server-side resources used by Blocks for Discogs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.90 ▼11.42
Dashboard /wp-admin3.33 ▲0.0246.39 ▼1.42
Posts /wp-admin/edit.php3.38 ▲0.0252.92 ▲0.82
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.47 ▲2.00
Media Library /wp-admin/upload.php3.25 ▲0.0235.80 ▲0.65

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Blocks for Discogs: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7813.18 ▼1.131.60 ▼0.2840.14 ▼2.64
Dashboard /wp-admin2,223 ▲385.86 ▲0.0495.89 ▼8.0481.92 ▲40.46
Posts /wp-admin/edit.php2,109 ▲201.98 ▼0.0139.66 ▲0.2836.25 ▲1.63
Add New Post /wp-admin/post-new.php6,439 ▲4,91123.50 ▲5.20889.51 ▲243.6637.81 ▼14.65
Media Library /wp-admin/upload.php1,408 ▲204.20 ▲0.0197.52 ▼7.1273.53 ▲29.83

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • 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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blocks-for-discogs/blocks-for-discogs.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


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 need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === blocks-for-discogs === )
The official readme.txt might help

blocks-for-discogs/blocks-for-discogs.php 85% from 13 tests

The primary PHP file in "Blocks for Discogs" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin421 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions15100.00%
▷ Anonymous functions00.00%
▷ 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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/noimage.png15.02KB6.17KB▼ 58.91%
assets/icon.png3.38KB0.46KB▼ 86.46%