84% motionlab

Code Review | Motionlab Player

WordPress plugin Motionlab Player scored84%from 54 tests.

About plugin

  • Plugin page: motionlab
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: May 15, 2019
  • Latest release: Nov 27, 2020
  • Number of updates: 9
  • Update frequency: every 69.4 days
  • Top authors: twodo (66.67%)motionlabio (44.44%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Motionlab Player
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.54 ▼0.96
Dashboard /wp-admin3.32 ▲0.0246.69 ▼0.05
Posts /wp-admin/edit.php3.37 ▲0.0145.39 ▼1.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.75 ▼6.59
Media Library /wp-admin/upload.php3.24 ▲0.0133.74 ▲1.02
Motionlab /wp-admin/admin.php?page=motionlab-main3.2135.93
Player /wp-admin/admin.php?page=motionlab-shortcode3.2130.88

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 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

Checking browser requirements for Motionlab Player
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.29 ▼0.834.01 ▲2.2842.78 ▼1.62
Dashboard /wp-admin2,230 ▲415.77 ▲0.83102.16 ▼17.5343.58 ▼3.19
Posts /wp-admin/edit.php2,113 ▲242.02 ▼0.0335.86 ▼5.1234.03 ▼1.32
Add New Post /wp-admin/post-new.php1,564 ▲2918.08 ▼5.08590.93 ▼85.5652.59 ▼1.11
Media Library /wp-admin/upload.php1,418 ▲274.26 ▲0.0294.84 ▼6.8243.42 ▲0.48
Motionlab /wp-admin/admin.php?page=motionlab-main8072.0324.3526.50
Player /wp-admin/admin.php?page=motionlab-shortcode7872.0625.5925.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/motionlab/motionlab.php
    • > /wp-content/plugins/motionlab/templates/iframe.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 is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: motionlab, embedding player, video

motionlab/motionlab.php Passed 13 tests

"Motionlab Player" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
133 characters long description:
Motionlab plugin is an easilly integrable player which allows to playback personlized videos from Motionlab platform in your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected86 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP313761466
JavaScript14920

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.04
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png4.50KB1.95KB▼ 56.74%
assets/banner-772x250.png17.26KB8.11KB▼ 53.02%
assets/icon-128x128.png2.22KB1.23KB▼ 44.54%