90% codepen-embed-block

Code Review | CodePen Embed Block

WordPress plugin CodePen Embed Block scored90%from 54 tests.

About plugin

  • Plugin page: codepen-embed-block
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 17, 2020
  • Latest release: Nov 18, 2023
  • Number of updates: 20
  • Update frequency: every 70.1 days
  • Top authors: chriscoyier (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /7,584 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by CodePen Embed Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.93 ▼4.97
Dashboard /wp-admin3.33 ▼0.0249.97 ▼9.55
Posts /wp-admin/edit.php3.38 ▲0.0248.30 ▲5.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.64 ▼0.49
Media Library /wp-admin/upload.php3.25 ▲0.0235.34 ▼0.17
CodePen Embed /wp-admin/options-general.php?page=cp_embed3.2228.09

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for CodePen Embed Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲5814.67 ▲0.321.78 ▲0.1746.68 ▲1.84
Dashboard /wp-admin2,199 ▲185.63 ▼0.0787.98 ▼24.8438.71 ▼7.70
Posts /wp-admin/edit.php2,104 ▲71.97 ▲0.0240.35 ▲2.8234.76 ▲0.30
Add New Post /wp-admin/post-new.php6,196 ▲4,67026.13 ▲2.48820.96 ▲131.1651.34 ▼4.05
Media Library /wp-admin/upload.php1,407 ▲44.20 ▲0.04100.31 ▼3.9541.67 ▼4.88
CodePen Embed /wp-admin/options-general.php?page=cp_embed7982.0126.4929.12

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: embed, codepen, gutenberg, code

codepen-embed-block/plugin.php 92% from 13 tests

The main PHP file in "CodePen Embed Block" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("codepen-embed-block.php" instead of "plugin.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
No dangerous file extensions were detected16,795 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JSON20016,448
JavaScript72614246
PHP22736101
CSS20230

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions6
▷ Named functions6100.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
No PNG files were detected