78% cal-embedder-lite

Code Review | UseStrict's Calendly Embedder

WordPress plugin UseStrict's Calendly Embedder scored78%from 54 tests.

About plugin

  • Plugin page: cal-embedder-lite
  • Plugin version: 1.1.6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2021
  • Latest release: Nov 9, 2023
  • Number of updates: 24
  • Update frequency: every 33.8 days
  • Top authors: useStrict (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /8,612 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.33ms] Passed 4 tests

Server-side resources used by UseStrict's Calendly Embedder
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1035.02 ▼6.15
Dashboard /wp-admin3.42 ▲0.0745.21 ▼15.18
Posts /wp-admin/edit.php3.54 ▲0.1850.73 ▲4.02
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.66 ▲4.01
Media Library /wp-admin/upload.php3.35 ▲0.1135.56 ▲4.15
UseStrict's Calendly Embedder /wp-admin/options-general.php?page=Wp_Cal_Embed_Lite3.3933.20

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

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

Browser metrics Passed 4 tests

A check of browser resources used by UseStrict's Calendly Embedder
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4714.60 ▲0.251.72 ▼0.0339.64 ▼3.86
Dashboard /wp-admin2,199 ▲195.61 ▼0.0292.38 ▲2.0742.92 ▲6.40
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0140.94 ▲3.9335.35 ▲3.52
Add New Post /wp-admin/post-new.php1,529 ▲323.03 ▼0.14601.62 ▲0.7845.13 ▼8.50
Media Library /wp-admin/upload.php1,404 ▲74.19 ▼0.0999.06 ▼1.4042.14 ▼2.75
UseStrict's Calendly Embedder /wp-admin/options-general.php?page=Wp_Cal_Embed_Lite1,9593.1986.6748.11

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cal-embedder-lite/cal-embedder-lite.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cal-embedder-lite/admin-settings.tmpl.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The settings screen, before connecting to the Calendly API.), #2 (By connecting to the Calendly API, we display a drop-down with your Profile screen and individual Event Types.), #3 (Sample drop-down values.), #4 (Extra options for displaying the **Pop-up Text Widget**, a.k.a. **Link** widget. Default is inline, as seen in the previous screenshots.), #5 (Extra options for displaying the **Pop-up Widget**, a.k.a. the **Badge** widget.)
You can take inspiration from this readme.txt

cal-embedder-lite/cal-embedder-lite.php Passed 13 tests

The main PHP script in "UseStrict's Calendly Embedder" version 1.1.6.2 is automatically included on every request by WordPress
73 characters long description:
Simple embedding for Calendly (and soon various other calendar services).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,572 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2198207838
JavaScript4103131639
CSS123395

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity68.00
▷ Minimum class complexity68.00
▷ Maximum class complexity68.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1356.52%
▷ Protected methods00.00%
▷ Private methods1043.48%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
5 PNG files occupy 1.72MB with 1.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png472.91KB144.05KB▼ 69.54%
screenshot-2.png326.56KB99.24KB▼ 69.61%
screenshot-5.png354.95KB94.61KB▼ 73.35%
screenshot-4.png269.58KB70.85KB▼ 73.72%
screenshot-1.png332.41KB102.15KB▼ 69.27%