83% wp-vn-oembed

Code Review | Wordpress VN oEmbed

WordPress plugin Wordpress VN oEmbed scored83%from 54 tests.

About plugin

  • Plugin page: wp-vn-oembed
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2014
  • Latest release: Sep 15, 2016
  • Number of updates: 24
  • Update frequency: every 30.4 days
  • Top authors: nguyenvanduocit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,747 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Wordpress VN oEmbed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.86 ▼3.04
Dashboard /wp-admin3.37 ▲0.0649.20 ▼3.00
Posts /wp-admin/edit.php3.48 ▲0.1250.42 ▲1.20
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.02 ▼1.77
Media Library /wp-admin/upload.php3.29 ▲0.0638.61 ▲0.42

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress VN oEmbed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▲0.091.79 ▼0.0445.16 ▲2.02
Dashboard /wp-admin2,198 ▲185.64 ▼0.0387.74 ▼12.2140.05 ▼4.84
Posts /wp-admin/edit.php2,103 ▼01.99 ▼0.0340.32 ▲1.6138.87 ▲3.12
Add New Post /wp-admin/post-new.php1,526 ▼023.18 ▼0.03620.06 ▼10.4857.82 ▲7.85
Media Library /wp-admin/upload.php1,403 ▲34.30 ▲0.0899.38 ▼5.5645.61 ▼2.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'VNO_DIR/lib/Psr4ClassLoader.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-vn-oembed/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'VN_OEmbed\\Handler\\Base' not found in wp-content/plugins/wp-vn-oembed/Handler/NCT.php:18
    • > PHP Warning
      require_once(VNO_DIR/lib/Psr4ClassLoader.php): failed to open stream: No such file or directory in wp-content/plugins/wp-vn-oembed/bootstrap.php on line 14
    • > PHP Warning
      Use of undefined constant VNO_DIR - assumed 'VNO_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-vn-oembed/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'VN_OEmbed\\Handler\\Base' not found in wp-content/plugins/wp-vn-oembed/Handler/Zing.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-vn-oembed/plugin.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'VN_OEmbed\\Handler\\Base' not found in wp-content/plugins/wp-vn-oembed/Handler/NhacSo.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'VN_OEmbed\\Handler\\Base' not found in wp-content/plugins/wp-vn-oembed/Handler/TVZing.php:18

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (Demo) image required
You can take inspiration from this readme.txt

wp-vn-oembed/plugin.php 85% from 13 tests

"Wordpress VN oEmbed" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-vn-oembed.php" instead of "plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 243 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin297 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP1054215297

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity5.88
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 images were found in this plugin