72% promo-video-maker

Code Review | Promo Video Maker

WordPress plugin Promo Video Maker scored72%from 54 tests.

About plugin

  • Plugin page: promo-video-maker
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.4-5.5.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2020
  • Latest release: Feb 18, 2021
  • Number of updates: 17
  • Update frequency: every 6.2 days
  • Top authors: yaronbid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /636 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼12.89ms] Passed 4 tests

Analyzing server-side resources used by Promo Video Maker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5339.74 ▼1.47
Dashboard /wp-admin3.88 ▲0.5749.97 ▲1.70
Posts /wp-admin/edit.php3.93 ▲0.5751.15 ▼0.40
Add New Post /wp-admin/post-new.php3.70 ▼2.2040.73 ▼51.39
Media Library /wp-admin/upload.php3.80 ▲0.5741.24 ▲6.76
Promo /wp-admin/admin.php?page=promo-video-maker-login3.6934.87
/wp-admin/admin.php?page=promo-video-maker-auth-start3.6129.84
/wp-admin/admin.php?page=promo-video-maker-login-success3.6138.33
My Videos /wp-admin/admin.php?page=promo-video-maker-dashboard3.6433.01
/wp-admin/admin.php?page=promo-video-maker-auth-regenerate-cookie3.6337.62
Settings /wp-admin/admin.php?page=promo-video-maker-oauth-settings3.6132.47
/wp-admin/admin.php?page=promo-video-maker-auth-finalize3.6228.87
/wp-admin/admin.php?page=promo-video-maker-auth-refresh3.6230.85

Server storage [IO: ▲78.96MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • Filesystem usage must be lower than 25MB (currently using 78.96MB)
Filesystem: 588 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Promo Video Maker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.21 ▼1.531.80 ▲0.0837.48 ▼1.50
Dashboard /wp-admin2,232 ▲445.87 ▲0.95117.79 ▼1.9974.77 ▲30.90
Posts /wp-admin/edit.php2,112 ▲232.00 ▲0.0338.71 ▼2.8136.16 ▼0.64
Add New Post /wp-admin/post-new.php1,544 ▲1117.88 ▼5.30684.45 ▲15.3681.88 ▲25.67
Media Library /wp-admin/upload.php1,414 ▲234.23 ▲0.0198.72 ▲0.6462.98 ▲19.10
Promo /wp-admin/admin.php?page=promo-video-maker-login68749.39915.9995.58
/wp-admin/admin.php?page=promo-video-maker-auth-start68749.36896.5740.21
/wp-admin/admin.php?page=promo-video-maker-login-success68749.33853.8741.29
My Videos /wp-admin/admin.php?page=promo-video-maker-dashboard68749.39954.1242.49
/wp-admin/admin.php?page=promo-video-maker-auth-regenerate-cookie68749.421,055.2343.04
Settings /wp-admin/admin.php?page=promo-video-maker-oauth-settings80.440.250.19
/wp-admin/admin.php?page=promo-video-maker-auth-finalize68749.30993.9748.25
/wp-admin/admin.php?page=promo-video-maker-auth-refresh280.440.083.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 18 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promo-video-maker-auth-finalize
    • > Notice in wp-content/plugins/promo-video-maker/includes/rest.php+345
    Undefined index: token
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promo-video-maker-auth-finalize
    • > Notice in wp-content/plugins/promo-video-maker/includes/rest.php+345
    Undefined index: username
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promo-video-maker-auth-finalize
    • > Notice in wp-content/plugins/promo-video-maker/includes/rest.php+345
    Undefined index: expiration
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promo-video-maker-auth-finalize
    • > Notice in wp-content/plugins/promo-video-maker/includes/rest.php+345
    Undefined index: hmac

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
Please fix the following items
  • 189× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/promo-video-maker/vendor/twig/twig/src/Node/DeprecatedNode.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/promo-video-maker/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/promo-video-maker/vendor/twig/twig/src/TokenParser/MacroTokenParser.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/promo-video-maker/vendor/twig/twig/src/Extension/CoreExtension.php:73
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\Loader\\LoaderInterface' not found in wp-content/plugins/promo-video-maker/vendor/twig/twig/src/Loader/ChainLoader.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/promo-video-maker/vendor/twig/twig/src/Extension/OptimizerExtension.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/promo-video-maker/vendor/twig/twig/src/Node/SetNode.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Promo\\JWTStorage\\JWTStorage' not found in wp-content/plugins/promo-video-maker/src/JWTStorage/CookieJWTStorage.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/promo-video-maker/vendor/guzzlehttp/psr7/src/BufferStream.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/promo-video-maker/vendor/twig/twig/src/TokenParser/DoTokenParser.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promo-video-maker-auth-finalize
    • > Network (severe)
    ?rest_route=/promo-video-maker/v1/config/consumer-keys - Failed to load resource: the server responded with a status of 403 (Forbidden)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=promo-video-maker-auth-finalize
    • > Javascript (severe) in unknown
    /wp-content/plugins/promo-video-maker/app/build/main.bundle.js?ver=1.1.2 1:30161535
    • > GET request to /wp-admin/admin.php?page=promo-video-maker-auth-refresh
    • > Network (severe)
    wp-admin/admin.php?page=promo-video-maker-auth-refresh - Failed to load resource: the server responded with a status of 400 (Bad Request)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No tags were found

promo-video-maker/promo-video-maker.php Passed 13 tests

The main file in "Promo Video Maker" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
139 characters long description:
#1 video creation platform for businesses and agencies. Built to help users create powerful visual content to promote anything effectively.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected51,820 lines of code in 553 files:
LanguageFilesBlank linesComment linesLines of code
PHP3315,1469,95543,008
Markdown151,09503,383
reStructuredText1122,3762,3032,872
JSON13001,174
SVG670521,167
JavaScript571970
Bourne Shell16143
YAML17439
Twig32228
XML10015
Dockerfile18010
make1409
CSS1011
HTML1001

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity11.08
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces42
Interfaces29
Traits2
Classes259
▷ Abstract classes114.25%
▷ Concrete classes24895.75%
▷ Final classes8333.47%
Methods1,592
▷ Static methods21213.32%
▷ Public methods1,33583.86%
▷ Protected methods523.27%
▷ Private methods20512.88%
Functions344
▷ Named functions22665.70%
▷ Anonymous functions11834.30%
Constants240
▷ Global constants4619.17%
▷ Class constants19480.83%
▷ Public constants19198.45%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.43MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
app/build/images/settings-collage.png109.24KB118.11KB0.00%
app/build/promo-js/images/promo-promote-footer/promo-promote-footer.png134.10KB145.26KB0.00%
app/build/images/mac.png197.52KB216.20KB0.00%