83% shrinking-video

Code Review | Shrinking Video

WordPress plugin Shrinking Video scored 83% from 54 tests.

About plugin

  • Plugin page: shrinking-video
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 29, 2016
  • Latest release: Jan 15, 2017
  • Number of updates: 15
  • Update frequency: every 1.1 days
  • Top authors: blakelong (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 643 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 gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.95ms] Passed 4 tests

Server-side resources used by Shrinking Video
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.51 ▲2.55
Dashboard /wp-admin3.32 ▲0.0243.40 ▼5.68
Posts /wp-admin/edit.php3.37 ▲0.0245.58 ▼2.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.59 ▼22.53
Media Library /wp-admin/upload.php3.24 ▲0.0238.47 ▲5.20

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Shrinking Video
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲17313.55 ▼0.847.60 ▲5.7039.29 ▼8.44
Dashboard /wp-admin2,209 ▲214.86 ▼0.9694.51 ▼23.7638.80 ▼9.66
Posts /wp-admin/edit.php2,089 ▲182.00 ▼0.0633.49 ▼3.1935.17 ▲1.63
Add New Post /wp-admin/post-new.php1,514 ▼2517.57 ▼0.75685.11 ▲22.1051.02 ▼8.72
Media Library /wp-admin/upload.php1,385 ▼34.25 ▲0.0397.41 ▼0.7242.44 ▼0.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/shrinking-video/shrinkingvideo.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shrinking-video/class.shrinkingvideo.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

shrinking-video/shrinkingvideo.php 92% from 13 tests

"Shrinking Video" version 1.1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("shrinking-video.php" instead of "shrinkingvideo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin186 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12095
PHP3192357
CSS10034

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods342.86%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin