84% correct-audio-video-uploads

Code Review | Correct Audio/Video Uploads

WordPress plugin Correct Audio/Video Uploads scored 84% from 54 tests.

About plugin

  • Plugin page: correct-audio-vid...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.19-4.7.3
  • WordPress version: 6.3.1
  • First release: Mar 27, 2017
  • Latest release: Apr 3, 2017
  • Number of updates: 11
  • Update frequency: every 0.6 days
  • Top authors: SergeyBiryukov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,304 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼0.08ms] Passed 4 tests

Analyzing server-side resources used by Correct Audio/Video Uploads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.51 ▼8.37
Dashboard /wp-admin3.35 ▲0.0447.47 ▲2.67
Posts /wp-admin/edit.php3.40 ▲0.0449.87 ▲5.01
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.78 ▲3.62
Media Library /wp-admin/upload.php3.27 ▲0.0434.34 ▲1.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Correct Audio/Video Uploads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.33 ▼0.971.63 ▼0.3945.69 ▼0.67
Dashboard /wp-admin2,209 ▲184.88 ▼0.0498.12 ▼4.4536.76 ▼10.78
Posts /wp-admin/edit.php2,089 ▼02.14 ▲0.1435.10 ▼3.0134.52 ▲3.34
Add New Post /wp-admin/post-new.php1,526 ▼923.32 ▼0.02622.18 ▼5.5857.82 ▲5.79
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0195.29 ▼0.6642.42 ▼0.40

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 did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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
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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/correct-audio-video-uploads/correct-audio-video-uploads.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: upload, media, audio, mime, video

correct-audio-video-uploads/correct-audio-video-uploads.php 92% from 13 tests

The main PHP script in "Correct Audio/Video Uploads" version 1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 280 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
Good job! No executable or dangerous file extensions detected215 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity50.00
▷ Minimum class complexity50.00
▷ Maximum class complexity50.00
Average method complexity9.17
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
There are no PNG files in this plugin