84% posttube-video-generator

Code Review | PostTube Audio/Video Generator - Convert Your Post into Video

WordPress plugin PostTube Audio/Video Generator - Convert Your Post into Video scored84%from 54 tests.

About plugin

  • Plugin page: posttube-video-ge...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 6.3.1
  • First release: Oct 21, 2020
  • Latest release: Jul 18, 2021
  • Number of updates: 67
  • Update frequency: every 4.0 days
  • Top authors: senols (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,206 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.27MB] [CPU: ▼0.46ms] Passed 4 tests

This is a short check of server-side resources used by PostTube Audio/Video Generator - Convert Your Post into Video
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3142.64 ▲0.54
Dashboard /wp-admin3.61 ▲0.3053.40 ▲0.47
Posts /wp-admin/edit.php3.66 ▲0.3051.89 ▼3.40
Add New Post /wp-admin/post-new.php6.13 ▲0.24103.64 ▲1.86
Media Library /wp-admin/upload.php3.47 ▲0.2439.72 ▲0.55

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 1,048 new files
Database: 2 new tables, 6 new options
New tables
wp_tube_log
wp_tube_config
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

PostTube Audio/Video Generator - Convert Your Post into Video: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.27 ▼1.104.61 ▲2.9340.48 ▼1.26
Dashboard /wp-admin2,208 ▲205.89 ▼0.01102.79 ▲2.9663.16 ▲14.84
Posts /wp-admin/edit.php2,103 ▲111.97 ▼0.0434.48 ▼7.8635.01 ▼10.06
Add New Post /wp-admin/post-new.php1,526 ▲1223.18 ▲5.78789.10 ▲112.8255.27 ▲3.00
Media Library /wp-admin/upload.php1,402 ▲144.22 ▲0.02110.51 ▲7.8145.42 ▼1.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 508× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/posttube-video-generator/vendor/google/common-protos/src/Type/Fraction.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\CredentialsLoader' not found in wp-content/plugins/posttube-video-generator/vendor/google/auth/src/Credentials/ServiceAccountCredentials.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/posttube-video-generator/vendor/google/common-protos/src/LongRunning/OperationInfo.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/posttube-video-generator/vendor/google/protobuf/src/Google/Protobuf/Mixin.php:77
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/posttube-video-generator/vendor/google/gax/tests/Tests/Unit/Transport/GrpcFallbackTransportTest.php:53
    • > PHP Fatal error
      Uncaught Error: Class 'Grpc\\AbstractCall' not found in wp-content/plugins/posttube-video-generator/vendor/grpc/grpc/src/lib/BidiStreamingCall.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/posttube-video-generator/vendor/google/common-protos/src/Api/Expr/V1alpha1/Expr/Call.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/posttube-video-generator/vendor/google/common-protos/src/Api/Service.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/posttube-video-generator/vendor/google/protobuf/src/Google/Protobuf/Internal/GeneratedCodeInfo/Annotation.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/posttube-video-generator/vendor/google/common-protos/src/Cloud/ServiceManagement/V1/GetServiceConfigRequest.php:16

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 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: converter, text-to-speech, audio converter, youtube, video...

posttube-video-generator/PostTube.php 92% from 13 tests

"PostTube Audio/Video Generator - Convert Your Post into Video" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("posttube-video-generator.php" instead of "PostTube.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin150,075 lines of code in 985 files:
LanguageFilesBlank linesComment linesLines of code
CSS59,97022376,453
PHP89411,97756,00153,355
SVG622113,800
Markdown341,44304,425
JSON24001,511
XML705169
Bourne Shell84380162
YAML36082
Protocol Buffers2143862
Python1164047
make1409

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.71
▷ Minimum class complexity1.00
▷ Maximum class complexity432.00
Average method complexity1.62
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces125
Interfaces32
Traits18
Classes819
▷ Abstract classes50.61%
▷ Concrete classes81499.39%
▷ Final classes212.58%
Methods4,970
▷ Static methods53510.76%
▷ Public methods4,60392.62%
▷ Protected methods460.93%
▷ Private methods3216.46%
Functions259
▷ Named functions10239.38%
▷ Anonymous functions15760.62%
Constants496
▷ Global constants112.22%
▷ Class constants48597.78%
▷ Public constants485100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/assets/img/admin_icon.png0.92KB0.91KB▼ 0.85%