84% spreebie-transcoder

Code Review | Spreebie Transcoder – Resize, Compress and Store Video

WordPress plugin Spreebie Transcoder – Resize, Compress and Store Video scored 84% from 54 tests.

About plugin

  • Plugin page: spreebie-transcoder
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.1
  • WordPress version: 6.3.1
  • First release: Mar 26, 2019
  • Latest release: Mar 26, 2019
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Thabo David Klass (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,830 total downloads

Benchmarks

Plugin footprint 82% 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.32MB] [CPU: ▲12.21ms] Passed 4 tests

This is a short check of server-side resources used by Spreebie Transcoder – Resize, Compress and Store Video
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3160.56 ▲15.49
Dashboard /wp-admin3.61 ▲0.3162.96 ▲11.85
Posts /wp-admin/edit.php3.73 ▲0.3767.33 ▲17.68
Add New Post /wp-admin/post-new.php6.22 ▲0.33112.37 ▲3.82
Media Library /wp-admin/upload.php3.54 ▲0.3156.55 ▲18.99
Spreebie Transcoded Media Categories /wp-admin/edit-tags.php?taxonomy=spreebie_transcoder_category&post_type=spreebie_t_m3.5559.59
View Spreebie Transcoded Media /wp-admin/edit.php?post_type=spreebie_t_m3.5852.03
Spreebie Transcoded Media Error Stages /wp-admin/edit-tags.php?taxonomy=spreebie_transcoder_error_stage&post_type=spreebie_t_m3.5452.07

Server storage [IO: ▲7.16MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • There were 2 files (0.05KB) illegally modified outside of "wp-content/plugins/spreebie-transcoder/" and "wp-content/uploads/"
    • (new file) out.txt
    • (new file) wp-admin/out.txt
Filesystem: 580 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-comments
spreebie_transcoder_max_video_size
spreebie_transcoder_system_environment_section
widget_theysaidso_widget
spreebie_transcoder_ffmpeg_speed
db_upgraded
can_compress_scripts
widget_recent-posts
spreebie_transcoder_error_stage_children
spreebie_transcoder_ffmpeg_quality
...

Browser metrics Passed 4 tests

A check of browser resources used by Spreebie Transcoder – Resize, Compress and Store Video
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲9413.62 ▼1.131.75 ▼0.1945.43 ▲2.12
Dashboard /wp-admin2,260 ▲725.89 ▼0.0796.32 ▼19.2738.32 ▼8.72
Posts /wp-admin/edit.php2,140 ▲512.05 ▲0.0440.27 ▲1.8334.81 ▼1.61
Add New Post /wp-admin/post-new.php1,562 ▲2023.12 ▲4.81658.45 ▼1.0762.43 ▲8.09
Media Library /wp-admin/upload.php1,442 ▲544.25 ▲0.04100.35 ▼3.9743.37 ▼1.96
Spreebie Transcoded Media Categories /wp-admin/edit-tags.php?taxonomy=spreebie_transcoder_category&post_type=spreebie_t_m2,1102.3230.1636.25
View Spreebie Transcoded Media /wp-admin/edit.php?post_type=spreebie_t_m1,1101.9930.0429.81
Spreebie Transcoded Media Error Stages /wp-admin/edit-tags.php?taxonomy=spreebie_transcoder_error_stage&post_type=spreebie_t_m1,5212.1927.9634.21

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 314× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/spreebie-transcoder/vendor/google/auth/tests/Credentials/AppIndentityCredentialsTest.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/spreebie-transcoder/vendor/google/auth/tests/Credentials/UserRefreshCredentialsTest.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/spreebie-transcoder/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Processor\\MemoryProcessor' not found in wp-content/plugins/spreebie-transcoder/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/spreebie-transcoder/vendor/guzzlehttp/guzzle/src/Pool.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/spreebie-transcoder/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Google\\Cloud\\Core\\Compute\\Metadata\\Readers\\ReaderInterface' not found in wp-content/plugins/spreebie-transcoder/vendor/google/cloud-core/src/Compute/Metadata/Readers/StreamReader.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/spreebie-transcoder/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Trait 'Google\\Cloud\\Core\\ArrayTrait' not found in wp-content/plugins/spreebie-transcoder/vendor/google/cloud-storage/src/Bucket.php on line 48
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/spreebie-transcoder/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: ffmpeg, compression, resizing, google cloud storage, video

spreebie-transcoder/spreebie-transcoder.php 92% from 13 tests

Analyzing the main PHP file in "Spreebie Transcoder – Resize, Compress and Store Video" version 1.0.1
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 609 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin47,287 lines of code in 543 files:
LanguageFilesBlank linesComment linesLines of code
PHP4807,97023,90236,458
JSON23405,677
Markdown301,42104,626
XSLT22320209
JavaScript23933152
CSS116079
YAML210042
XML23035
make1409

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity6.88
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces54
Interfaces35
Traits41
Classes424
▷ Abstract classes122.83%
▷ Concrete classes41297.17%
▷ Final classes102.43%
Methods2,923
▷ Static methods1565.34%
▷ Public methods2,37981.39%
▷ Protected methods2227.59%
▷ Private methods32211.02%
Functions292
▷ Named functions7525.68%
▷ Anonymous functions21774.32%
Constants177
▷ Global constants42.26%
▷ Class constants17397.74%
▷ Public constants173100.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
5 compressed PNG files occupy 0.40MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png155.44KB164.62KB0.00%
screenshot-5.png39.76KB41.49KB0.00%
screenshot-2.png84.97KB87.64KB0.00%
screenshot-4.png85.67KB91.47KB0.00%
screenshot-3.png39.01KB41.46KB0.00%