84% post-video-metabox

Code Review | Post Video Metabox

WordPress plugin Post Video Metabox scored84%from 54 tests.

About plugin

  • Plugin page: post-video-metabox
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.7-5.2.1
  • WordPress version: 6.3.1
  • First release: Jan 2, 2018
  • Latest release: Aug 22, 2020
  • Number of updates: 13
  • Update frequency: every 87.5 days
  • Top authors: palagorn.p (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,238 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼12.02ms] Passed 4 tests

Server-side resources used by Post Video Metabox
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.87 ▼6.82
Dashboard /wp-admin3.31 ▲0.0145.02 ▼7.67
Posts /wp-admin/edit.php3.36 ▲0.0146.44 ▼4.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.82 ▼29.46
Media Library /wp-admin/upload.php3.24 ▲0.0133.89 ▲2.05

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Post Video Metabox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲15213.66 ▼0.548.54 ▲6.8341.85 ▼4.61
Dashboard /wp-admin2,213 ▲224.88 ▼0.00109.02 ▼2.5240.11 ▼2.19
Posts /wp-admin/edit.php2,096 ▲72.04 ▲0.0641.64 ▲1.7134.51 ▼2.15
Add New Post /wp-admin/post-new.php6,287 ▲4,75119.82 ▼3.30851.88 ▲254.2056.90 ▲7.57
Media Library /wp-admin/upload.php1,392 ▲104.29 ▲0.0695.20 ▼7.7941.88 ▼2.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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-video-metabox/inc/classes/PVT_Plugin.php on line 10
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/post-video-metabox/inc/classes/PVT_Plugin.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-video-metabox/inc/classes/PVT_Plugin.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/post-video-metabox/post-video-metabox.php:14

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 93% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Post Metabox), #2 (Post Thumbnail), #3 (Video Play)
Please take inspiration from this readme.txt

post-video-metabox/post-video-metabox.php 92% from 13 tests

This is the main PHP file of "Post Video Metabox" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected4,367 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JSON2004,037
JavaScript63315120
PHP24147110
Sass521194
SVG1004
CSS2022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin