77% codepen-embedded-pen-shortcode

Code Review | Plugin Name: CodePen Embedded Pens Shortcode

WordPress plugin Plugin Name: CodePen Embedded Pens Shortcode scored77%from 54 tests.

About plugin

  • Plugin page: codepen-embedded-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-5.6.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2014
  • Latest release: Feb 9, 2021
  • Number of updates: 23
  • Update frequency: every 112.7 days
  • Top authors: chriscoyier (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /25,307 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
Installer ran successfully

Server metrics [RAM: ▼0.12MB] [CPU: ▼9.33ms] Passed 4 tests

An overview of server-side resources used by Plugin Name: CodePen Embedded Pens Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0442.06 ▼14.87
Dashboard /wp-admin3.32 ▲0.0151.38 ▼2.80
Posts /wp-admin/edit.php3.37 ▼0.4856.53 ▼5.74
Add New Post /wp-admin/post-new.php5.90 ▲0.01112.88 ▼12.87
Media Library /wp-admin/upload.php3.24 ▲0.0135.21 ▼3.82
CodePen Embeds /wp-admin/options-general.php?page=my-setting-admin3.2331.74

Server storage [IO: ▲0.23MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Plugin Name: CodePen Embedded Pens Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.27 ▼0.941.72 ▼0.2046.98 ▼4.79
Dashboard /wp-admin2,225 ▲194.85 ▼0.06106.60 ▼27.6844.25 ▼4.50
Posts /wp-admin/edit.php2,107 ▲41.98 ▼0.0643.64 ▲0.5737.53 ▼1.98
Add New Post /wp-admin/post-new.php1,534 ▼023.08 ▼0.06691.41 ▲17.2761.47 ▲11.75
Media Library /wp-admin/upload.php1,407 ▲74.24 ▼0.0998.89 ▼15.3045.77 ▼2.02
CodePen Embeds /wp-admin/options-general.php?page=my-setting-admin8112.0225.1230.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=my-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=my-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/codepen-embedded-pen-shortcode/codepen.php:80

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 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
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Plugin Name: CodePen Embedded Pens Shortcode === )
  • Contributors: The plugin contributors field is not present
  • Screenshots: Please add images for these screenshots: #1 (An Embedded Pen), #2 (Settings Page), #3 (Editor with Shortcode)
The official readme.txt might help

codepen-embedded-pen-shortcode/codepen.php 92% from 13 tests

The entry point to "Plugin Name: CodePen Embedded Pens Shortcode" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("codepen-embedded-pen-shortcode.php" instead of "codepen.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin141 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14812141

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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 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
3 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png89.29KB26.18KB▼ 70.69%
screenshot-3.png103.51KB40.59KB▼ 60.79%
screenshot-2.png30.85KB9.24KB▼ 70.05%