84% insert-video-with-shortcode

Code Review | Video Short Code

WordPress plugin Video Short Code scored84%from 54 tests.

About plugin

  • Plugin page: insert-video-with...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 6.3.1
  • First release: Apr 5, 2013
  • Latest release: Nov 17, 2014
  • Number of updates: 11
  • Update frequency: every 53.7 days
  • Top authors: caijiamx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,947 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.68MB] [CPU: ▼24.51ms] Passed 4 tests

A check of server-side resources used by Video Short Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0436.18 ▼2.52
Dashboard /wp-admin3.35 ▲0.0045.28 ▼21.04
Posts /wp-admin/edit.php3.46 ▲0.1148.32 ▲4.13
Add New Post /wp-admin/post-new.php3.08 ▼2.8125.58 ▼76.67
Media Library /wp-admin/upload.php3.27 ▲0.0436.34 ▲2.19

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Video Short Code: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.81 ▲0.421.80 ▲0.1240.47 ▼3.56
Dashboard /wp-admin2,203 ▲155.86 ▼0.20108.07 ▼9.5340.30 ▼4.76
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.1039.45 ▲5.1634.07 ▲0.87
Add New Post /wp-admin/post-new.php1,533 ▼123.11 ▼0.03680.55 ▲14.9452.76 ▲1.68
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0799.28 ▼5.9643.96 ▼3.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

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)
Everything seems fine, however 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
  • 1× 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/insert-video-with-shortcode/video.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: short code, tudou, youku, ku6, 56...

insert-video-with-shortcode/video.php 92% from 13 tests

The principal PHP file in "Video Short Code" v. 1.2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("insert-video-with-shortcode.php" instead of "video.php")

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
There were no executable files found in this plugin199 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11911199

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.65
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
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 are no PNG files in this plugin