89% block-carbon-code

Code Review | Carbon Code

WordPress plugin Carbon Code scored89%from 54 tests.

About plugin

  • Plugin page: block-carbon-code
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.2
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Jun 28, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: epiqueras (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Server-side resources used by Carbon Code
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.25 ▼0.24
Dashboard /wp-admin3.31 ▲0.0141.56 ▼9.74
Posts /wp-admin/edit.php3.36 ▲0.0145.70 ▲0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.78 ▼16.32
Media Library /wp-admin/upload.php3.23 ▲0.0133.06 ▼0.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Carbon Code: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.62 ▼0.971.67 ▼0.0442.14 ▼1.46
Dashboard /wp-admin2,209 ▲214.88 ▲0.01105.15 ▼4.0140.74 ▼3.89
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0340.03 ▲2.3635.54 ▲3.06
Add New Post /wp-admin/post-new.php6,192 ▲4,65018.94 ▼4.22853.09 ▲190.4153.13 ▼21.58
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0496.31 ▼4.2842.25 ▼0.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: block, block-editor, code, gutenberg

block-carbon-code/plugin.php 92% from 13 tests

The main file in "Carbon Code" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("block-carbon-code.php" instead of "plugin.php")

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
Success! There were no dangerous files found in this plugin7,087 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,966
JavaScript26077
PHP211224
Markdown212020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 1.33MB with 0.91MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png27.05KB7.30KB▼ 73.01%
assets/screenshot-1.png485.73KB173.00KB▼ 64.38%
assets/screenshot-3.png165.53KB57.19KB▼ 65.45%
assets/banner-1544x500.png90.08KB26.47KB▼ 70.62%
assets/icon-128x128.png20.91KB6.37KB▼ 69.54%