84% subtitle

Code Review | Subtitle

WordPress plugin Subtitle scored84%from 54 tests.

About plugin

  • Plugin page: subtitle
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 1, 2013
  • Latest release: May 1, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: ShinichiN (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /3,517 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.02ms] Passed 4 tests

An overview of server-side resources used by Subtitle
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.72 ▼3.93
Dashboard /wp-admin3.32 ▲0.0148.42 ▼7.44
Posts /wp-admin/edit.php3.37 ▲0.0149.81 ▲0.98
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.16 ▲4.44
Media Library /wp-admin/upload.php3.24 ▲0.0136.94 ▲2.33

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

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/subtitle/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Subtitle
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.60 ▼0.812.02 ▲0.1541.87 ▼1.38
Dashboard /wp-admin2,221 ▲154.88 ▼0.0199.64 ▼18.4539.07 ▼3.79
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0141.88 ▲5.6835.19 ▼0.63
Add New Post /wp-admin/post-new.php1,545 ▲1923.25 ▲5.41669.77 ▲20.8956.97 ▲0.19
Media Library /wp-admin/upload.php1,397 ▼34.26 ▲0.01102.49 ▼7.9142.28 ▼3.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/subtitle/subtitle.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Subtitle input field appears!)
You can take inspiration from this readme.txt

subtitle/subtitle.php Passed 13 tests

The main PHP script in "Subtitle" version 0.1 is automatically included on every request by WordPress
59 characters long description:
This plugin adds simple meta field to wp-admin/post-new.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 plugin59 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131359

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 PNG file occupies 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png145.99KB44.25KB▼ 69.69%