78% lh-oembed-white-list

Code Review | LH Oembed White List

WordPress plugin LH Oembed White List scored78%from 54 tests.

About plugin

  • Plugin page: lh-oembed-white-list
  • Plugin version: 1.02
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Oct 4, 2019
  • Number of updates: 5
  • Update frequency: every 166.0 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /760 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.64ms] Passed 4 tests

Server-side resources used by LH Oembed White List
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.55 ▲0.95
Dashboard /wp-admin3.31 ▲0.0144.59 ▼5.20
Posts /wp-admin/edit.php3.36 ▲0.0145.91 ▼2.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.88 ▼16.23
Media Library /wp-admin/upload.php3.23 ▲0.0134.38 ▲1.23
Oembed White List /wp-admin/options-general.php?page=lh-oembed-white-list/lh-oembed-white-list.php3.2332.23

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for LH Oembed White List
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼0.901.68 ▼0.0536.59 ▼11.71
Dashboard /wp-admin2,210 ▲255.91 ▲0.0595.40 ▼3.6840.63 ▼5.37
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0633.78 ▼8.0633.36 ▼4.47
Add New Post /wp-admin/post-new.php1,517 ▼2617.66 ▼0.62665.54 ▲73.8861.44 ▲8.95
Media Library /wp-admin/upload.php1,386 ▲14.18 ▲0.0194.78 ▼1.0243.30 ▲0.22
Oembed White List /wp-admin/options-general.php?page=lh-oembed-white-list/lh-oembed-white-list.php7802.0324.2423.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=lh-oembed-white-list/lh-oembed-white-list.php
    • > Notice in wp-content/plugins/lh-oembed-white-list/partials/option-settings.php+3
    Undefined property: LH_Oembed_white_list_plugin::$hidden_field_name
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lh-oembed-white-list/lh-oembed-white-list.php
    • > Notice in wp-content/plugins/lh-oembed-white-list/partials/option-settings.php+4
    Undefined property: LH_Oembed_white_list_plugin::$namespace

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/lh-oembed-white-list/partials/option-settings.php:1

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Requires at least: Version format is invalid
You can look at the official readme.txt

lh-oembed-white-list/lh-oembed-white-list.php Passed 13 tests

The principal PHP file in "LH Oembed White List" v. 1.02 is loaded by WordPress automatically on each request
62 characters long description:
Embed any link from the web easily as a beautiful Content Card

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected132 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP211620132

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods433.33%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin