78% hide-header-on-posts-for-a-landing-page

Code Review | Hide Header on Posts for Landing Pages

WordPress plugin Hide Header on Posts for Landing Pages scored78%from 54 tests.

About plugin

  • Plugin page: hide-header-on-po...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Sep 23, 2018
  • Latest release: Apr 27, 2020
  • Number of updates: 9
  • Update frequency: every 64.7 days
  • Top authors: JoseVega (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /9,427 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Server-side resources used by Hide Header on Posts for Landing Pages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.90 ▼0.17
Dashboard /wp-admin3.33 ▲0.0349.89 ▼3.77
Posts /wp-admin/edit.php3.45 ▲0.0949.11 ▼1.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.88 ▼2.44
Media Library /wp-admin/upload.php3.26 ▲0.0336.55 ▲1.08
WP Templates /wp-admin/admin.php?page=wcpt_welcome_page3.2740.97
WP Templates /wp-admin/admin.php?page=wcpt_whats_new3.2032.51

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
vgse_welcome_redirect
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
wcpt_welcome_redirect
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Hide Header on Posts for Landing Pages
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.72 ▲0.351.98 ▲0.1045.77 ▲0.09
Dashboard /wp-admin2,208 ▲285.55 ▼0.1387.40 ▼5.1839.58 ▼2.18
Posts /wp-admin/edit.php2,116 ▲162.02 ▲0.0337.44 ▲0.8737.43 ▲1.34
Add New Post /wp-admin/post-new.php6,377 ▲4,84619.04 ▼4.08876.92 ▲180.3653.91 ▼6.15
Media Library /wp-admin/upload.php1,410 ▲134.30 ▲0.1294.50 ▼8.8744.65 ▲0.43
WP Templates /wp-admin/admin.php?page=wcpt_welcome_page9281.9924.9330.91
WP Templates /wp-admin/admin.php?page=wcpt_whats_new8891.9924.9728.95

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
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • vgse_welcome_redirect
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • wcpt_welcome_redirect
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=wcpt_whats_new
    • > Warning in wp-content/plugins/hide-header-on-posts-for-a-landing-page/vendor/vg-plugin-sdk/index.php+164
    include(wp-content/plugins/hide-header-on-posts-for-a-landing-page/views/whats-new/1.0.3.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=wcpt_whats_new
    • > Warning in wp-content/plugins/hide-header-on-posts-for-a-landing-page/vendor/vg-plugin-sdk/index.php+164
    include(): Failed opening 'wp-content/plugins/hide-header-on-posts-for-a-landing-page/views/whats-new/1.0.3.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/admin.php?page=wcpt_whats_new
    • > Notice in wp-content/plugins/hide-header-on-posts-for-a-landing-page/vendor/vg-plugin-sdk/index.php+166
    Undefined variable: items

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
The following issues need your attention
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hide-header-on-posts-for-a-landing-page/views/welcome-page-content.php:1
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/hide-header-on-posts-for-a-landing-page/views/metabox.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/hide-header-on-posts-for-a-landing-page/vendor/vg-plugin-sdk/samples/email-optin-form.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/hide-header-on-posts-for-a-landing-page/views/metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/hide-header-on-posts-for-a-landing-page/vendor/vg-plugin-sdk/views/page-template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/hide-header-on-posts-for-a-landing-page/wp-hide-header-posts.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VG_Hide_Post_Header_Instance() in wp-content/plugins/hide-header-on-posts-for-a-landing-page/views/upgrade-message.php:2
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/hide-header-on-posts-for-a-landing-page/views/metabox.php on line 2

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

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: themes, wp page templates, custom pages, wordpress templates, custom templates...

hide-header-on-posts-for-a-landing-page/wp-hide-header-posts.php 92% from 13 tests

The entry point to "Hide Header on Posts for Landing Pages" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("hide-header-on-posts-for-a-landing-page.php" instead of "wp-hide-header-posts.php")

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
No dangerous file extensions were detected816 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP714560550
JavaScript15011218
CSS16048

PHP code Passed 2 tests

A brief analysis 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.30
Average class complexity30.00
▷ Minimum class complexity24.00
▷ Maximum class complexity36.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods2896.55%
▷ Protected methods00.00%
▷ Private methods13.45%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/logo.png7.44KB3.88KB▼ 47.91%