74% masvideos

Code Review | MAS Videos

WordPress plugin MAS Videos scored74%from 54 tests.

About plugin

  • Plugin page: masvideos
  • Plugin version: 1.2.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 11, 2019
  • Latest release: Apr 3, 2023
  • Number of updates: 60
  • Update frequency: every 24.2 days
  • Top authors: farookibrahim (68.33%)yousufansa (18.33%)madrasthemes (16.67%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active /73,827 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲7.12MB] [CPU: ▲47.83ms] 50% from 4 tests

This is a short check of server-side resources used by MAS Videos
Please fix the following
  • RAM: Try to keep total memory usage under 10MB (currently 10.30MB on /wp-admin/edit-tags.php?taxonomy=tv_show_tag&post_type=tv_show)
  • Extra RAM: The extra memory usage must be under 5MB (currently 7.12MB on /wp-admin/edit-tags.php?taxonomy=tv_show_tag&post_type=tv_show)
PageMemory (MB)CPU Time (ms)
Home /10.61 ▲7.1485.38 ▲42.95
Dashboard /wp-admin10.45 ▲7.1593.99 ▲38.99
Posts /wp-admin/edit.php10.50 ▲7.14112.09 ▲60.86
Add New Post /wp-admin/post-new.php13.74 ▲7.86157.82 ▲48.53
Media Library /wp-admin/upload.php10.26 ▲7.03108.59 ▲72.15
All Movies /wp-admin/edit.php?post_type=movie10.4387.99
Add New /wp-admin/post-new.php?post_type=person13.78136.45
Add New /wp-admin/post-new.php?post_type=tv_show13.83149.81
Add New /wp-admin/post-new.php?post_type=movie13.89153.68
Tags /wp-admin/edit-tags.php?taxonomy=person_tag&post_type=person10.3094.25
Add New /wp-admin/post-new.php?post_type=video13.84146.39
Categories /wp-admin/edit-tags.php?taxonomy=video_cat&post_type=video10.3087.44
Attributes /wp-admin/edit.php?post_type=tv_show&page=tv_show_attributes10.3574.82
Video Import /wp-admin/edit.php?post_type=video&page=video_importer10.5479.61
Tags /wp-admin/edit-tags.php?taxonomy=tv_show_tag&post_type=tv_show10.3075.80

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 450 new files
Database: 1 new table, 34 new options
New tables
wp_masvideos_attribute_taxonomies
New WordPress options
widget_masvideos_widget_movies_genres
widget_masvideos_movies_filter_widget
widget_masvideos_movies_rating_filter
widget_masvideos_movies_year_filter
widget_masvideos_tv_shows_widget
widget_masvideos_widget_movies_layered_nav
widget_masvideos_tv_shows_rating_filter
widget_masvideos_movies_widget
masvideos_meta_box_errors
widget_masvideos_widget_videos_categories
...

Browser metrics Passed 4 tests

A check of browser resources used by MAS Videos
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,319 ▲55816.00 ▲1.728.07 ▲6.3941.91 ▼5.63
Dashboard /wp-admin2,561 ▲3876.82 ▲1.20125.21 ▲32.7644.84 ▼1.68
Posts /wp-admin/edit.php2,482 ▲4003.88 ▲1.8873.52 ▲39.1535.98 ▼5.03
Add New Post /wp-admin/post-new.php1,855 ▲32722.34 ▼0.91615.46 ▼72.8835.81 ▼35.97
Media Library /wp-admin/upload.php1,622 ▲2224.67 ▲0.47112.52 ▲11.9447.79 ▲7.26
All Movies /wp-admin/edit.php?post_type=movie1,5123.9080.6334.94
Add New /wp-admin/post-new.php?post_type=person6,94924.441,060.2496.40
Add New /wp-admin/post-new.php?post_type=tv_show7,09924.83864.4575.55
Add New /wp-admin/post-new.php?post_type=movie2,64819.56875.4883.80
Tags /wp-admin/edit-tags.php?taxonomy=person_tag&post_type=person1,6513.8568.7136.04
Add New /wp-admin/post-new.php?post_type=video6,98823.99924.7173.36
Categories /wp-admin/edit-tags.php?taxonomy=video_cat&post_type=video1,7023.8048.5977.32
Attributes /wp-admin/edit.php?post_type=tv_show&page=tv_show_attributes1,3443.7051.9234.63
Video Import /wp-admin/edit.php?post_type=video&page=video_importer1,3483.6344.0838.92
Tags /wp-admin/edit-tags.php?taxonomy=tv_show_tag&post_type=tv_show1,6513.7847.8130.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_masvideos_attribute_taxonomies
  • This plugin did not uninstall successfully, leaving 34 options in the database
    • widget_masvideos_movies_tags_filter_widget
    • widget_masvideos_movies_widget
    • masvideos_version
    • widget_masvideos_movies_filter_widget
    • widget_masvideos_videos_widget
    • widget_masvideos_videos_tags_filter_widget
    • current_theme_supports_masvideos
    • widget_masvideos_tv_shows_tags_filter_widget
    • widget_masvideos_videos_filter_widget
    • masvideos_db_version
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'MasVideos_Widget' not found in wp-content/plugins/masvideos/includes/widgets/class-masvideos-videos-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MasVideos_Widget' not found in wp-content/plugins/masvideos/includes/widgets/class-masvideos-movies-widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MasVideos_Widget' not found in wp-content/plugins/masvideos/includes/widgets/class-masvideos-tv-shows-widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
7 plugin tags: videos, movie, movies, tv, television series...

masvideos/masvideos.php Passed 13 tests

The primary PHP file in "MAS Videos" version 1.2.8 is used by WordPress to initiate all plugin functionality
88 characters long description:
This is a free plugin that allows you to to create and list movies, videos and TV shows.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin85,306 lines of code in 428 files:
LanguageFilesBlank linesComment linesLines of code
PHP32211,18525,14349,218
JavaScript747,7453,87030,656
Sass1088434,932
CSS2095636498
SVG2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity35.17
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces10
Traits0
Classes152
▷ Abstract classes74.61%
▷ Concrete classes14595.39%
▷ Final classes21.38%
Methods2,061
▷ Static methods30714.90%
▷ Public methods1,56075.69%
▷ Protected methods40019.41%
▷ Private methods1014.90%
Functions822
▷ Named functions822100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
15 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png0.11KB0.14KB0.00%
assets/css/jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png0.11KB0.14KB0.00%
assets/css/jquery-ui/images/ui-icons_222222_256x240.png6.86KB4.18KB▼ 39.05%
assets/images/placeholder.png24.75KB10.16KB▼ 58.94%
assets/css/jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%