68% wp-automatic-video-player-resize

Code Review | WP Automatic Video Player ReSize

WordPress plugin WP Automatic Video Player ReSize scored68%from 54 tests.

About plugin

  • Plugin page: wp-automatic-vide...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2015
  • Latest release: Sep 26, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: truser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,592 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼40.16ms] Passed 4 tests

Server-side resources used by WP Automatic Video Player ReSize
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.67 ▼4.73
Dashboard /wp-admin3.01 ▼0.3022.96 ▼37.18
Posts /wp-admin/edit.php3.01 ▼0.3525.60 ▼26.91
Add New Post /wp-admin/post-new.php3.01 ▼2.8922.50 ▼78.00
Media Library /wp-admin/upload.php3.01 ▼0.2320.88 ▼18.53
Video Player Resize /wp-admin/options-general.php?page=Video-Player-Resize3.0122.42

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

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

Browser metrics Passed 4 tests

WP Automatic Video Player ReSize: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.34 ▼0.011.78 ▼0.1539.41 ▼3.64
Dashboard /wp-admin2,196 ▲255.48 ▼0.2882.76 ▼11.2239.29 ▼5.01
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0342.75 ▲0.8636.48 ▼3.74
Add New Post /wp-admin/post-new.php1,529 ▲322.99 ▼0.18684.62 ▲35.2160.85 ▲10.72
Media Library /wp-admin/upload.php1,398 ▲14.13 ▼0.0799.31 ▼8.5441.34 ▼6.92
Video Player Resize /wp-admin/options-general.php?page=Video-Player-Resize7892.0224.5127.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Video-Player-Resize
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=Video-Player-Resize
    • > Notice in wp-content/plugins/wp-automatic-video-player-resize/index.php+20
    Undefined index: hiddenoption

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-automatic-video-player-resize/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
9 plugin tags: wordpress automatic video size, wordpres, wordpress automatic size, wordpress automatic player size, wordpress youtube player resize...

wp-automatic-video-player-resize/index.php 92% from 13 tests

The principal PHP file in "WP Automatic Video Player ReSize" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-automatic-video-player-resize.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171140

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin