84% embed-notion-pages

Code Review | Embed Notion Pages

WordPress plugin Embed Notion Pages scored 84% from 54 tests.

About plugin

  • Plugin page: embed-notion-pages
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2023
  • Latest release: Jun 27, 2023
  • Number of updates: 3
  • Update frequency: every 2.7 days
  • Top authors: embednotionpages (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 291 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼0.63ms] Passed 4 tests

Analyzing server-side resources used by Embed Notion Pages
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.34 ▼4.45
Dashboard /wp-admin3.36 ▲0.0547.38 ▼0.89
Posts /wp-admin/edit.php3.47 ▲0.1148.40 ▲3.14
Add New Post /wp-admin/post-new.php5.96 ▲0.0797.87 ▲7.52
Media Library /wp-admin/upload.php3.28 ▲0.0535.94 ▼0.33

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Embed Notion Pages
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.92 ▼0.377.84 ▲6.0740.56 ▼10.16
Dashboard /wp-admin2,210 ▲284.82 ▼0.07110.89 ▲12.0840.23 ▼3.63
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0038.93 ▲3.6433.95 ▼0.12
Add New Post /wp-admin/post-new.php1,518 ▲422.98 ▲5.52585.23 ▼102.2650.17 ▼7.05
Media Library /wp-admin/upload.php1,389 ▲44.16 ▼0.0693.19 ▼24.3143.15 ▼4.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/embed-notion-pages/admin/partials/embed-notion-pages-admin-display.php
    • > /wp-content/plugins/embed-notion-pages/public/partials/embed-notion-pages-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Create your embed on [Embed Notion Pages](https://www.embednotionpages.com) and copy the WordPress shortcode), #2 (Insert shortcode into your page or post), #3 (Your Notion page will be embedded in your WordPress page or post)
The official readme.txt is a good inspiration

embed-notion-pages/embed-notion-pages.php 92% from 13 tests

This is the main PHP file of "Embed Notion Pages" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 210 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin221 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12132543215
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods27.69%
▷ Public methods2076.92%
▷ Protected methods00.00%
▷ Private methods623.08%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 files were detected