84% genially-embed

Code Review | WordPress Genially Embed

WordPress plugin WordPress Genially Embed scored84%from 54 tests.

About plugin

  • Plugin page: genially-embed
  • Plugin version: 4.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 9, 2015
  • Latest release: Feb 24, 2023
  • Number of updates: 63
  • Update frequency: every 41.9 days
  • Top authors: genially (95.24%)carazo (6.35%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /6,287 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.01MB] [CPU: ▼7.92ms] Passed 4 tests

A check of server-side resources used by WordPress Genially Embed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.63 ▼5.04
Dashboard /wp-admin3.32 ▲0.0250.26 ▲1.15
Posts /wp-admin/edit.php3.37 ▲0.0144.07 ▼5.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.70 ▼21.90
Media Library /wp-admin/upload.php3.24 ▲0.0137.53 ▲1.42
Genially /wp-admin/options-general.php?page=genially_embed3.2130.27

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

WordPress Genially Embed: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.31 ▼1.071.71 ▲0.0044.61 ▲2.40
Dashboard /wp-admin2,212 ▲275.80 ▼0.2095.32 ▼6.6637.83 ▼2.17
Posts /wp-admin/edit.php2,095 ▲62.04 ▼0.0134.31 ▼8.7232.43 ▼6.04
Add New Post /wp-admin/post-new.php6,355 ▲4,81327.62 ▲9.03914.09 ▲250.8058.24 ▲8.30
Media Library /wp-admin/upload.php1,394 ▲94.31 ▲0.09102.63 ▼0.5144.83 ▼3.03
Genially /wp-admin/options-general.php?page=genially_embed8122.0231.5732.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genially-embed/genially-embed.php:94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/genially-embed/block/block.php:8

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Too many tags (63 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

genially-embed/genially-embed.php Passed 13 tests

"WordPress Genially Embed" version 4.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
WordPress Genially Embed plugin adding your Genially iframes to your website.

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
Everything looks great! No dangerous files found in this plugin814 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS250316
PHP77756313
PO File22940102
JavaScript313081
Markdown1102

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.12
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods27
▷ Static methods518.52%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icon-genially.png4.95KB2.52KB▼ 49.06%
assets/images/icon-genially.png4.95KB2.52KB▼ 49.06%
admin/images/logo.png28.93KB11.46KB▼ 60.39%
(invalid) assets/images/._icon-genially.png4.00KB0.00KB▼ 100.00%
assets/images/settings-genially-tinymce.png3.90KB2.05KB▼ 47.51%