84% responsive-header

Code Review | Responsive Header Plugin

WordPress plugin Responsive Header Plugin scored 84% from 54 tests.

About plugin

  • Plugin page: responsive-header
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2014
  • Latest release: Dec 4, 2014
  • Number of updates: 11
  • Update frequency: every 13.5 days
  • Top authors: Mehtevas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,337 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.86ms] Passed 4 tests

Server-side resources used by Responsive Header Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0154.44 ▲10.64
Dashboard /wp-admin3.34 ▲0.0347.90 ▼1.40
Posts /wp-admin/edit.php3.39 ▲0.0347.18 ▲1.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.52 ▲0.59
Media Library /wp-admin/upload.php3.26 ▲0.0338.66 ▲6.24

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

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

Browser metrics Passed 4 tests

Responsive Header Plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲10114.78 ▲1.612.79 ▲0.9842.36 ▼1.87
Dashboard /wp-admin2,209 ▼05.84 ▼0.06109.11 ▲9.9683.45 ▲41.82
Posts /wp-admin/edit.php2,107 ▲212.02 ▲0.0134.83 ▲0.8234.62 ▼1.21
Add New Post /wp-admin/post-new.php1,680 ▲14721.76 ▼1.55751.43 ▲57.8054.26 ▼1.08
Media Library /wp-admin/upload.php1,406 ▲184.08 ▼0.22110.86 ▲5.9672.68 ▲25.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-header/rhp-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-header/rhp-settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
3 plugin tags: header, responsive, text

responsive-header/rhp-front.php 92% from 13 tests

The entry point to "Responsive Header Plugin" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("responsive-header.php" instead of "rhp-front.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 plugin295 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3114278
JavaScript1111517

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/document.png1.70KB0.97KB▼ 42.64%