84% wp-subtitle

Code Review | WP Subtitle

WordPress plugin WP Subtitle scored84%from 54 tests.

About plugin

  • Plugin page: wp-subtitle
  • Plugin version: 3.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.9.3
  • WordPress version: 6.3.1
  • First release: Jul 9, 2009
  • Latest release: Apr 22, 2022
  • Number of updates: 67
  • Update frequency: every 69.7 days
  • Top authors: husobj (97.01%)husani (4.48%)

Code review

54 tests

User reviews

21 reviews

Install metrics

20,000+ active /453,817 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼3.98ms] Passed 4 tests

Server-side resources used by WP Subtitle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.25 ▲3.06
Dashboard /wp-admin3.53 ▲0.2251.89 ▲4.68
Posts /wp-admin/edit.php3.59 ▲0.2348.28 ▲0.63
Add New Post /wp-admin/post-new.php6.08 ▲0.1983.14 ▼17.72
Media Library /wp-admin/upload.php3.39 ▲0.1634.39 ▼1.87

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Subtitle
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.43 ▼0.151.71 ▼0.1643.96 ▲3.77
Dashboard /wp-admin2,203 ▲125.91 ▲1.02109.75 ▲11.2541.67 ▼2.50
Posts /wp-admin/edit.php2,121 ▲322.02 ▲0.0132.99 ▼7.1334.02 ▼4.18
Add New Post /wp-admin/post-new.php6,217 ▲4,67525.93 ▲7.56834.99 ▲221.3965.19 ▲2.97
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0196.02 ▼4.1742.86 ▲0.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-subtitle/wp-subtitle.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-subtitle/plugin/admin/admin.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/wp-subtitle/plugin/plugin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-subtitle/plugin/admin/pointers.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-subtitle/plugin/includes/shortcode.php:3

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: title, subhead, content, alternate title, subheading...

wp-subtitle/wp-subtitle.php Passed 13 tests

Analyzing the main PHP file in "WP Subtitle" version 3.4.1
88 characters long description:
Adds a subtitle field to pages and posts. Possible to add support for custom post types.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,123 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12392833764
Markdown21440280
PO File1101340
JavaScript2161539

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.60
▷ Minimum class complexity2.00
▷ Maximum class complexity36.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods69
▷ Static methods4057.97%
▷ Public methods5275.36%
▷ Protected methods11.45%
▷ Private methods1623.19%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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