84% wplp-code-snippet

Code Review | Code Snippet Beautifier

WordPress plugin Code Snippet Beautifier scored 84% from 54 tests.

About plugin

  • Plugin page: wplp-code-snippet
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 22, 2019
  • Latest release: May 22, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wplabourparty (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,118 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.15ms] Passed 4 tests

Analyzing server-side resources used by Code Snippet Beautifier
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.14 ▲2.66
Dashboard /wp-admin3.32 ▲0.0244.36 ▼1.06
Posts /wp-admin/edit.php3.37 ▲0.0148.18 ▼2.76
Add New Post /wp-admin/post-new.php7.25 ▲1.36107.23 ▲5.88
Media Library /wp-admin/upload.php3.24 ▲0.0136.08 ▲0.55

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Code Snippet Beautifier: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲17918.07 ▲3.64112.90 ▲110.8545.79 ▼3.61
Dashboard /wp-admin2,206 ▲215.82 ▲0.9297.52 ▼3.7037.29 ▼7.53
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0539.48 ▼3.5634.86 ▼1.40
Add New Post /wp-admin/post-new.php6,422 ▲4,88523.71 ▲0.61842.16 ▲215.3448.49 ▼3.85
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.0195.65 ▼10.2339.85 ▼7.11

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
The following items require your attention
  • Zombie WordPress options were found after 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
Good news, no errors were detected

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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_block_type() in wp-content/plugins/wplp-code-snippet/blocks/code-snippet/render.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Requires at least: Version not formatted correctly
Please take inspiration from this readme.txt

wplp-code-snippet/wplp-code-snippet-beautifier.php 92% from 13 tests

The entry point to "Code Snippet Beautifier" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wplp-code-snippet.php" instead of "wplp-code-snippet-beautifier.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin409 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript34038203
CSS43121154
PHP4222052

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin