84% generate-audiogram-block

Code Review | Generate Audiogram Block

WordPress plugin Generate Audiogram Block scored84%from 54 tests.

About plugin

  • Plugin page: generate-audiogra...
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 6.3.1
  • First release: Nov 9, 2021
  • Latest release: Nov 10, 2021
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: firewatch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Generate Audiogram Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.52 ▼0.20
Dashboard /wp-admin3.32 ▼0.0346.10 ▼15.04
Posts /wp-admin/edit.php3.37 ▲0.0144.23 ▼2.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.88 ▼3.62
Media Library /wp-admin/upload.php3.24 ▲0.0134.39 ▼0.92

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Generate Audiogram Block
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.21 ▲0.241.77 ▲0.1344.64 ▲1.64
Dashboard /wp-admin2,198 ▲185.62 ▼0.0494.70 ▲9.4740.79 ▲3.22
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0335.14 ▼4.0333.65 ▲0.15
Add New Post /wp-admin/post-new.php6,367 ▲4,83927.86 ▲4.78839.19 ▲186.0463.57 ▲9.47
Media Library /wp-admin/upload.php1,400 ▼04.22 ▲0.0093.97 ▼8.1940.21 ▼2.36

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • 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 smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-audiogram-block/generate-audiogram-block.php:23

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 Passed 29 tests

readme.txt Passed 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
5 plugin tags: audiogram, media, captions, podcast, block

generate-audiogram-block/generate-audiogram-block.php Passed 13 tests

The main PHP file in "Generate Audiogram Block" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
Generate and customize audiograms in the block editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin2,121 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63595921,992
JSON20041
PHP261728
Sass15027
CSS11424
Markdown1509

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin