10% subheading

Code Review | SubHeading

WordPress plugin SubHeading scored10%from 54 tests.

About plugin

  • Plugin page: subheading
  • Plugin version: 1.8.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.2.3
  • WordPress version: 6.3.1
  • First release: Oct 15, 2009
  • Latest release: Jul 27, 2015
  • Number of updates: 94
  • Update frequency: every 22.5 days
  • Top authors: 36flavours (57.45%)stvwhtly (43.62%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /63,080 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/subheading/subheading.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; SubHeading has a deprecated constructor

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

An overview of server-side resources used by SubHeading
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.50 ▼1.59
Dashboard /wp-admin3.32 ▼0.0247.09 ▼13.91
Posts /wp-admin/edit.php3.44 ▲0.0842.64 ▼7.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.90 ▼15.70
Media Library /wp-admin/upload.php3.25 ▲0.0235.44 ▼0.91

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
subheading
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

SubHeading: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.421.77 ▼0.1443.17 ▼2.62
Dashboard /wp-admin2,206 ▲175.85 ▲0.96113.06 ▼6.9741.35 ▼2.79
Posts /wp-admin/edit.php2,091 ▲22.04 ▲0.0734.21 ▼1.3734.12 ▼1.57
Add New Post /wp-admin/post-new.php1,514 ▼1417.74 ▼5.32662.91 ▼22.7857.11 ▲2.79
Media Library /wp-admin/upload.php1,391 ▲64.21 ▲0.04102.27 ▼0.7845.65 ▲2.83

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means 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
Please take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/subheading/panel.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/subheading/subheading.php:106

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (The subheading option is displayed directly below the main title.), #2 (Settings are managed via the Settings > Reading page.)
Please take inspiration from this readme.txt

subheading/subheading.php 92% from 13 tests

"SubHeading" version 1.8.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 175 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 detected548 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP335192420
PO File23030114
JavaScript10014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity67.00
▷ Minimum class complexity67.00
▷ Maximum class complexity67.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.49KB11.01KB▼ 46.27%
screenshot-2.png24.10KB11.04KB▼ 54.20%