78% responsive-subheader

Code Review | Responsive Subheader

WordPress plugin Responsive Subheader scored78%from 54 tests.

About plugin

  • Plugin page: responsive-subheader
  • Plugin version: 1.0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2015
  • Latest release: Nov 20, 2015
  • Number of updates: 14
  • Update frequency: every 19.2 days
  • Top authors: DMBarber (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,918 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Responsive Subheader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.70 ▲0.25
Dashboard /wp-admin3.31 ▼0.0448.11 ▼18.15
Posts /wp-admin/edit.php3.36 ▲0.0053.65 ▲0.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.13 ▼5.46
Media Library /wp-admin/upload.php3.23 ▲0.0038.44 ▼0.51

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

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

Browser metrics Passed 4 tests

Responsive Subheader: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.271.77 ▲0.0344.05 ▲1.62
Dashboard /wp-admin2,195 ▲215.58 ▲0.0091.05 ▼0.2539.77 ▼0.08
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0339.67 ▲3.4535.11 ▼0.05
Add New Post /wp-admin/post-new.php1,526 ▼823.18 ▼0.01661.33 ▼47.7658.54 ▲8.85
Media Library /wp-admin/upload.php1,397 ▼34.21 ▲0.03108.64 ▼2.1647.21 ▼1.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/responsive-subheader/templates/responsive-subheader-template.php
    • > /wp-content/plugins/responsive-subheader/responsive-subheader.php
    • > /wp-content/plugins/responsive-subheader/templates/responsive-subheader-admin-settings-page.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/responsive-subheader/templates/responsive-subheader-admin-usage-display.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% 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
8 plugin tags: slider, page-title, sub-header, featured image, color-picker...

responsive-subheader/responsive-subheader.php 92% from 13 tests

The main file in "Responsive Subheader" v. 1.0.5.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,223 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP5173319701
CSS32343483
JavaScript421139

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity79.00
▷ Minimum class complexity79.00
▷ Maximum class complexity79.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2472.73%
▷ Protected methods13.03%
▷ Private methods824.24%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
17 PNG files occupy 1.97MB with 0.99MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Nivo/bullets.png1.25KB1.08KB▼ 13.74%
images/overlays/rs-overlay-circular.png10.30KB6.24KB▼ 39.38%
images/overlays/rs-overlay-squared.png3.56KB0.49KB▼ 86.34%
images/overlays/rs-overlay-no-img.png0.22KB0.12KB▼ 48.25%
assets/screenshot-2.png131.55KB48.19KB▼ 63.37%