84% simple-subtitles

Code Review | Simple Subtitles

WordPress plugin Simple Subtitles scored84%from 54 tests.

About plugin

  • Plugin page: simple-subtitles
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: Apr 11, 2016
  • Latest release: May 11, 2016
  • Number of updates: 9
  • Update frequency: every 3.3 days
  • Top authors: desrosj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /5,626 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by Simple Subtitles
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0248.03 ▲6.87
Dashboard /wp-admin3.33 ▲0.0256.39 ▲3.06
Posts /wp-admin/edit.php3.38 ▲0.0254.98 ▲3.98
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.11 ▼20.79
Media Library /wp-admin/upload.php3.25 ▲0.0240.58 ▲2.55

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
simple_subtitles_version
simple_subtitle_settings
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Simple Subtitles
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.31 ▼0.311.77 ▲0.0344.02 ▲0.67
Dashboard /wp-admin2,196 ▲225.55 ▼0.1288.06 ▼9.1338.79 ▼7.20
Posts /wp-admin/edit.php2,104 ▲222.03 ▲0.0335.25 ▼2.3232.01 ▼2.87
Add New Post /wp-admin/post-new.php1,532 ▼1323.21 ▲0.13615.00 ▼70.4747.49 ▼1.57
Media Library /wp-admin/upload.php1,398 ▼24.24 ▲0.0298.08 ▼10.7943.74 ▼0.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • simple_subtitle_settings
    • widget_theysaidso_widget
    • db_upgraded
    • simple_subtitles_version
    • can_compress_scripts

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 everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-subtitles/simple-subtitles.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-subtitles/upgrades.php:8

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
1 plugin tags: subtitles

simple-subtitles/simple-subtitles.php 85% from 13 tests

"Simple Subtitles" version 2.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin294 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP272135252
CSS12022
JavaScript12020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity20.50
▷ Minimum class complexity12.00
▷ Maximum class complexity29.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin