78% lvl99-omny-embed

Code Review | LVL99 Omny Embed

WordPress plugin LVL99 Omny Embed scored 78% from 54 tests.

About plugin

  • Plugin page: lvl99-omny-embed
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 9, 2016
  • Latest release: Jan 9, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: lvl99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.58ms] Passed 4 tests

An overview of server-side resources used by LVL99 Omny Embed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.87 ▲4.92
Dashboard /wp-admin3.34 ▲0.0453.97 ▲4.91
Posts /wp-admin/edit.php3.45 ▲0.1043.53 ▼11.61
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.85 ▲5.72
Media Library /wp-admin/upload.php3.26 ▲0.0334.01 ▼0.55
Omny Embed /wp-admin/options-general.php?page=lvl99-omny-embed-options3.2628.85

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for LVL99 Omny Embed
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲9813.91 ▲0.589.05 ▲4.6143.74 ▲3.89
Dashboard /wp-admin2,212 ▲95.86 ▲0.06105.95 ▲11.6940.01 ▲1.93
Posts /wp-admin/edit.php2,095 ▲62.01 ▲0.0535.02 ▼1.8336.39 ▲0.66
Add New Post /wp-admin/post-new.php1,519 ▼2317.58 ▼0.55616.83 ▼58.2862.07 ▲5.86
Media Library /wp-admin/upload.php1,394 ▲34.22 ▲0.0194.82 ▼9.3642.65 ▼3.42
Omny Embed /wp-admin/options-general.php?page=lvl99-omny-embed-options1,0172.0424.2541.65

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=lvl99-omny-embed-options
    • > Warning in wp-content/plugins/lvl99-omny-embed/lib/classes/lvl99-plugin.php+591
    count(): Parameter must be an array or an object that implements Countable

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/lvl99-omny-embed/views/admin-index.php
    • > /wp-content/plugins/lvl99-omny-embed/classes/lvl99-omny-embed.php
    • > /wp-content/plugins/lvl99-omny-embed/lvl99-omny-embed.php
    • > /wp-content/plugins/lvl99-omny-embed/views/admin-options.php
    • > /wp-content/plugins/lvl99-omny-embed/lib/classes/lvl99-plugin.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Configurable options) image not found
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

lvl99-omny-embed/lvl99-omny-embed.php Passed 13 tests

The main PHP script in "LVL99 Omny Embed" version 0.1.0 is automatically included on every request by WordPress
135 characters long description:
Easily embed media hosted on Omny within your WordPress site. Supports omnyapp.com and omnycontent.com URLs and the `[omny]` shortcode.

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
No dangerous file extensions were detected1,716 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP53337581,048
JavaScript380125287
Bourne Shell12935135
CSS2294110
Markdown280096
JSON10040

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity101.50
▷ Minimum class complexity65.00
▷ Maximum class complexity138.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods61
▷ Static methods69.84%
▷ Public methods5081.97%
▷ Protected methods1118.03%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.15MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png150.40KB43.75KB▼ 70.91%