83% create-cached-wp-header-and-footer

Code Review | Create cached wp header footer

WordPress plugin Create cached wp header footer scored83%from 54 tests.

About plugin

  • Plugin page: create-cached-wp-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2020
  • Latest release: Jul 12, 2021
  • Number of updates: 7
  • Update frequency: every 37.0 days
  • Top authors: jwphpglobe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 total downloads


Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.18ms] Passed 4 tests

Analyzing server-side resources used by Create cached wp header footer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.15 ▼8.71
Dashboard /wp-admin3.33 ▲0.0248.91 ▲0.48
Posts /wp-admin/edit.php3.38 ▲0.0246.28 ▼2.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.27 ▼1.78
Media Library /wp-admin/upload.php3.25 ▲0.0234.34 ▲0.16

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • There were 2 files (25.49KB) illegally modified outside of "wp-content/plugins/create-cached-wp-header-and-footer/" and "wp-content/uploads/"
    • (new file) ccwhf/header.html
    • (new file) ccwhf/footer.html
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Create cached wp header footer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.32 ▼1.065.11 ▲2.9340.48 ▼4.24
Dashboard /wp-admin2,206 ▲184.86 ▼0.04103.93 ▼4.6940.64 ▼3.21
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0239.47 ▼0.4935.65 ▲1.58
Add New Post /wp-admin/post-new.php1,533 ▼923.57 ▲5.33664.52 ▲39.4450.59 ▼1.54
Media Library /wp-admin/upload.php1,382 ▼64.23 ▲0.0594.70 ▼12.3841.10 ▼3.94

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/create-cached-wp-header-and-footer/trunk/create-cached-wp-header-footer.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/create-cached-wp-header-and-footer/create-cached-wp-header-footer.php:90

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 86% 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: footer, header, custom php

create-cached-wp-header-and-footer/create-cached-wp-header-footer.php 69% from 13 tests

This is the main PHP file of "Create cached wp header footer" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("create-cached-wp-header-and-footer.php" instead of "create-cached-wp-header-footer.php")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6" instead of "7.0")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.5")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin119 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions18100.00%
▷ Anonymous functions00.00%
▷ 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
No PNG files were detected