10% dailymotion-search-and-publish-videos

Code Review | DailyMotion Search and Publish Videos

WordPress plugin DailyMotion Search and Publish Videos scored 10% from 54 tests.

About plugin

  • Plugin page: dailymotion-searc...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 5.8.1
  • First release: Jul 10, 2014
  • Latest release: Dec 9, 2015
  • Number of updates: 38
  • Update frequency: every 13.6 days
  • Top authors: walihassan (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active / 7,632 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/dailymotion-search-and-publish-videos/classes/ocv_dm.php+47
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼0.90MB] [CPU: ▼172.21ms] Passed 4 tests

This is a short check of server-side resources used by DailyMotion Search and Publish Videos
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1334.30 ▲12.81
Dashboard /wp-admin2.76 ▼0.3020.12 ▼25.43
Posts /wp-admin/edit.php2.76 ▼0.3517.01 ▼27.12
Add New Post /wp-admin/post-new.php2.76 ▼2.6820.76 ▼623.09
Media Library /wp-admin/upload.php2.76 ▼0.2524.69 ▼13.19
- Vimeo Videos /wp-admin/admin.php?page=ocv_vimeo2.7620.62
- User Settings /wp-admin/admin.php?page=ocv_settings2.7625.26
- Youtube Videos /wp-admin/admin.php?page=ocv_youtube2.7621.81
- DailyMotion Videos /wp-admin/admin.php?page=ocv_dailymotion2.7615.99

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for DailyMotion Search and Publish Videos
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,769 ▲17316.54 ▲0.988.46 ▲0.8148.70 ▲1.26
Dashboard /wp-admin3,041 ▲1106.68 ▲0.55141.42 ▼6.40109.67 ▼6.65
Posts /wp-admin/edit.php2,803 ▲672.69 ▲0.0165.92 ▲1.5494.56 ▲2.01
Add New Post /wp-admin/post-new.php1,733 ▲5718.68 ▼0.18360.20 ▼13.01132.95 ▲26.09
Media Library /wp-admin/upload.php1,874 ▲675.55 ▲0.52137.24 ▼8.28119.73 ▼5.77
- Vimeo Videos /wp-admin/admin.php?page=ocv_vimeo1,2402.7357.0084.73
- User Settings /wp-admin/admin.php?page=ocv_settings1,9382.9965.56100.86
- Youtube Videos /wp-admin/admin.php?page=ocv_youtube1,2372.6058.0876.10
- DailyMotion Videos /wp-admin/admin.php?page=ocv_dailymotion1,2362.6056.6472.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ocv_dailymotion
    • > User notice in wp-includes/functions.php+5663
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dailymotion-search-and-publish-videos/dsp_plugin.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ocv_dailymotion
    • > Javascript (severe) in unknown
    /wp-content/plugins/dailymotion-search-and-publish-videos/js/ocv_plugin.js?ver=5.8.1 201:41 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: The official readme.txt is a good inspiration

dailymotion-search-and-publish-videos/dsp_plugin.php 92% from 13 tests

"DailyMotion Search and Publish Videos" version 3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dailymotion-search-and-publish-videos.php" instead of "dsp_plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected3,523 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS21092,024
PHP75746730
SVG100565
JavaScript12915204

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.28MB with 0.14MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ocv_logo.png261.03KB74.13KB▼ 71.60%
images/one_click_videos.png8.79KB5.66KB▼ 35.61%
images/buy.png13.91KB7.92KB▼ 43.10%