10% video-audio-bbcodes

Code Review | Video and Audio BBCodes

WordPress plugin Video and Audio BBCodes scored 10% from 54 tests.

About plugin

  • Plugin page: video-audio-bbcodes
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.5.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2013
  • Latest release: May 21, 2016
  • Number of updates: 9
  • Update frequency: every 126.6 days
  • Top authors: antonchanning (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,253 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/video-audio-bbcodes/video-audio-bbcodes.php+41
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.45ms] Passed 4 tests

This is a short check of server-side resources used by Video and Audio BBCodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.86 ▼33.12
Dashboard /wp-admin2.05 ▼1.266.36 ▼41.36
Posts /wp-admin/edit.php2.05 ▼1.315.67 ▼41.42
Add New Post /wp-admin/post-new.php2.05 ▼3.845.40 ▼97.91
Media Library /wp-admin/upload.php2.05 ▼1.185.01 ▼30.92
Video Audio BBCode /wp-admin/options-general.php?page=video-audio-bbcodes2.055.47

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Video and Audio BBCodes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.27 ▼1.121.58 ▼0.0738.83 ▼6.63
Dashboard /wp-admin2,210 ▲195.84 ▲0.94101.39 ▼0.7438.89 ▼2.05
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0138.25 ▼5.2835.36 ▼3.29
Add New Post /wp-admin/post-new.php1,545 ▲1018.28 ▼5.01609.01 ▼38.2348.60 ▼1.33
Media Library /wp-admin/upload.php1,389 ▲14.24 ▲0.1093.42 ▼8.9141.42 ▲0.35
Video Audio BBCode /wp-admin/options-general.php?page=video-audio-bbcodes8542.0325.6427.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/video-audio-bbcodes/video-audio-bbcodes.php+41
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=video-audio-bbcodes
    • > Deprecated in wp-content/plugins/video-audio-bbcodes/video-audio-bbcodes.php+41
    Function create_function() is deprecated

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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/video-audio-bbcodes/options-form-template.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/video-audio-bbcodes/video-audio-bbcodes.php on line 32
    • > PHP Notice
      Undefined variable: whitelist_enabled in wp-content/plugins/video-audio-bbcodes/options-form-template.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/video-audio-bbcodes/video-audio-bbcodes.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/video-audio-bbcodes/video-audio-bbcodes-admin.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=video-audio-bbcodes
    • > Network (severe)
    https://button.flattr.com/loader.js?mode=auto - Failed to load resource: the server responded with a status of 404 ()

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
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === video-audio-bbcodes === )
Please take inspiration from this readme.txt

video-audio-bbcodes/video-audio-bbcodes.php Passed 13 tests

"Video and Audio BBCodes" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
77 characters long description:
Adds support for video and audio bbcodes to wordpress, buddypress and bbpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin327 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP410798327

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity6.75
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected