84% fitvids-for-wordpress

Code Review | FitVids for WordPress

WordPress plugin FitVids for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: fitvids-for-wordp...
  • Plugin version: 3.0.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.1
  • WordPress version: 6.3.1
  • First release: Sep 11, 2011
  • Latest release: Oct 26, 2022
  • Number of updates: 58
  • Update frequency: every 70.1 days
  • Top authors: kevindees (100%)

Code review

54 tests

User reviews

33 reviews

Install metrics

8,000+ active /114,924 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.91ms] Passed 4 tests

Analyzing server-side resources used by FitVids for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.43 ▲1.69
Dashboard /wp-admin3.34 ▲0.0348.36 ▼4.27
Posts /wp-admin/edit.php3.39 ▲0.0346.83 ▼2.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.10 ▼5.26
Media Library /wp-admin/upload.php3.26 ▲0.0338.67 ▲0.33
FitVids /wp-admin/themes.php?page=fitvids-wp3.3733.79

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

FitVids for WordPress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16713.57 ▼0.7110.19 ▲8.6042.37 ▲1.40
Dashboard /wp-admin2,202 ▲225.57 ▼0.0894.52 ▲5.4839.84 ▼6.05
Posts /wp-admin/edit.php2,104 ▲72.00 ▼0.0235.88 ▼2.7033.22 ▼1.99
Add New Post /wp-admin/post-new.php1,540 ▲1418.37 ▼4.79664.70 ▼18.0464.58 ▲6.42
Media Library /wp-admin/upload.php1,407 ▲134.28 ▲0.13100.41 ▼1.8044.59 ▲2.99
FitVids /wp-admin/themes.php?page=fitvids-wp9762.0022.4327.53

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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
Please fix the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fitvids-for-wordpress/uninstall.php
    • > /wp-content/plugins/fitvids-for-wordpress/admin.php
    • > /wp-content/plugins/fitvids-for-wordpress/help.php
    • > /wp-content/plugins/fitvids-for-wordpress/fitvids-for-wordpress.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: fitvids, videos, responsive

fitvids-for-wordpress/fitvids-for-wordpress.php Passed 13 tests

The main PHP file in "FitVids for WordPress" ver. 3.0.13 adds more information about the plugin and also serves as the entry point for this plugin
81 characters long description:
This plugin makes videos responsive using the FitVids jQuery plugin on WordPress.

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
Good job! No executable or dangerous file extensions detected304 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4359240
JavaScript1131264

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png49.35KB29.15KB▼ 40.93%