93% visual-subtitle

Code Review | Visual Subtitle

WordPress plugin Visual Subtitle scored 93% from 54 tests.

About plugin

  • Plugin page: visual-subtitle
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-5.5
  • WordPress version: 5.8.1
  • First release: Jun 1, 2011
  • Latest release: Aug 1, 2020
  • Number of updates: 10
  • Update frequency: every 334.9 days
  • Top authors: GaryJ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 10,023 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼141.03ms] Passed 4 tests

This is a short check of server-side resources used by Visual Subtitle
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1636.59 ▲8.70
Dashboard /wp-admin3.11 ▲0.0544.99 ▼1.59
Posts /wp-admin/edit.php3.20 ▲0.0947.03 ▼1.42
Add New Post /wp-admin/post-new.php5.47 ▲0.0389.39 ▼561.38
Media Library /wp-admin/upload.php3.05 ▲0.0534.19 ▲0.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Visual Subtitle
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲14316.19 ▲0.528.31 ▼3.5943.83 ▼12.60
Dashboard /wp-admin3,003 ▲736.35 ▲0.38153.44 ▼5.05105.28 ▼9.59
Posts /wp-admin/edit.php2,830 ▲913.16 ▲0.4381.42 ▲15.9689.94 ▲1.99
Add New Post /wp-admin/post-new.php1,723 ▲4017.58 ▼1.11383.77 ▼41.74124.99 ▲13.08
Media Library /wp-admin/upload.php1,877 ▲705.52 ▲0.48160.10 ▼21.84112.15 ▼9.03

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/visual-subtitle/visual-subtitle.php:25

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

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5 in visual-subtitle/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === visual-subtitle === )
The official readme.txt might help

visual-subtitle/visual-subtitle.php 92% from 13 tests

Analyzing the main PHP file in "Visual Subtitle" version 1.2.0
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected266 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP248222175
Bourne Shell1222762
CSS10116
JavaScript11013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1381.25%
▷ Protected methods318.75%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
10 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets-wp-repo/screenshot-1.png12.98KB6.77KB▼ 47.83%
assets-wp-repo/screenshot-3.png5.82KB2.12KB▼ 63.64%
screenshot-4.png21.50KB7.16KB▼ 66.70%
screenshot-5.png32.04KB10.51KB▼ 67.19%
screenshot-2.png13.77KB5.23KB▼ 62.05%