77% brid-video-easy-publish

Code Review | Brid Video Easy Publish

WordPress plugin Brid Video Easy Publish scored77%from 54 tests.

About plugin

  • Plugin page: brid-video-easy-p...
  • Plugin version: 3.7.12
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 2, 2014
  • Latest release: Oct 27, 2023
  • Number of updates: 163
  • Update frequency: every 20.5 days
  • Top authors: Sovica (85.89%)nebojsadabic (14.72%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /38,272 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.05MB] [CPU: ▼2.28ms] 75% from 4 tests

An overview of server-side resources used by Brid Video Easy Publish
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 909.82ms on /wp-admin/options-general.php?page=brid-video-config-setting)
PageMemory (MB)CPU Time (ms)
Home /4.50 ▲1.0440.22 ▲4.02
Dashboard /wp-admin4.37 ▲1.0252.38 ▼5.64
Posts /wp-admin/edit.php4.46 ▲1.1049.52 ▲3.54
Add New Post /wp-admin/post-new.php6.97 ▲1.0886.55 ▼11.03
Media Library /wp-admin/upload.php4.27 ▲1.0441.58 ▲7.54
Settings /wp-admin/admin.php?page=brid-video-config4.92925.64
Video Library /wp-admin/admin.php?page=brid-video-menu4.83897.40
Brid.tv /wp-admin/options-general.php?page=brid-video-config-setting4.92909.82

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 358 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
brid_options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Brid Video Easy Publish: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲8814.51 ▲0.141.78 ▲0.2238.56 ▼0.13
Dashboard /wp-admin2,242 ▲645.56 ▼0.0682.74 ▼19.3765.31 ▲22.40
Posts /wp-admin/edit.php2,162 ▲621.99 ▲0.0234.67 ▼4.5332.22 ▼6.21
Add New Post /wp-admin/post-new.php6,435 ▲4,90926.45 ▲3.06963.74 ▲325.1170.58 ▲14.67
Media Library /wp-admin/upload.php1,462 ▲624.07 ▼0.12100.83 ▲6.7266.25 ▲24.97
Settings /wp-admin/admin.php?page=brid-video-config1,1894.0468.9886.28
Video Library /wp-admin/admin.php?page=brid-video-menu8862.5023.0425.89
Brid.tv /wp-admin/options-general.php?page=brid-video-config-setting1,1954.0050.9682.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/brid-video-easy-publish/html/error.php
    • > /wp-content/plugins/brid-video-easy-publish/html/form/adBox.php
    • > /wp-content/plugins/brid-video-easy-publish/html/adBoxUnit.php
    • > /wp-content/plugins/brid-video-easy-publish/html/adBoxBanner.php
  • 192× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: adType in wp-content/plugins/brid-video-easy-publish/html/adBoxBanner.php on line 11
    • > PHP Warning
      require_once(BRID_PLUGIN_DIR/html/video_library.php): failed to open stream: No such file or directory in wp-content/plugins/brid-video-easy-publish/html/library.php on line 16
    • > PHP Notice
      Undefined variable: adType in wp-content/plugins/brid-video-easy-publish/html/adBoxBanner.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/brid-video-easy-publish/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php:8
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/brid-video-easy-publish/html/form/post/carousel.php on line 17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/brid-video-easy-publish/vendor/guzzlehttp/psr7/src/Stream.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/brid-video-easy-publish/html/form/add_playlist.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/brid-video-easy-publish/vendor/league/oauth2-client/src/Grant/Password.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/brid-video-easy-publish/vendor/guzzlehttp/psr7/src/AppendStream.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/brid-video-easy-publish/html/form/edit_video.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

brid-video-easy-publish/brid.php 85% from 13 tests

This is the main PHP file of "Brid Video Easy Publish" version 3.7.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("brid-video-easy-publish.php" instead of "brid.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 295 characters long)

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 plugin60,549 lines of code in 269 files:
LanguageFilesBlank linesComment linesLines of code
PHP2024,8218,31723,933
CSS62,77917017,691
JavaScript653963612,558
Markdown181,35903,925
JSON12101,262
SVG221320775
HTML17745383
XML10019
Bourne Shell1203

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity16.67
▷ Minimum class complexity1.00
▷ Maximum class complexity310.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces18
Interfaces30
Traits10
Classes104
▷ Abstract classes21.92%
▷ Concrete classes10298.08%
▷ Final classes3534.31%
Methods1,093
▷ Static methods28526.08%
▷ Public methods83576.40%
▷ Protected methods11010.06%
▷ Private methods14813.54%
Functions130
▷ Named functions3224.62%
▷ Anonymous functions9875.38%
Constants89
▷ Global constants1617.98%
▷ Class constants7382.02%
▷ Public constants6284.93%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
65 PNG files occupy 0.18MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/option_selected.png1.22KB0.23KB▼ 80.83%
img/x.png1.92KB0.82KB▼ 57.16%
img/buttons_small.png2.10KB1.26KB▼ 40.21%
img/arrow_down_wide.png1.11KB0.26KB▼ 76.50%
css/images/ui-icons_ffd27a_256x240.png4.27KB4.11KB▼ 3.78%