84% j7-beaver-headers-footers

Code Review | J7 Beaver Header Footer Templates

WordPress plugin J7 Beaver Header Footer Templates scored84%from 54 tests.

About plugin

  • Plugin page: j7-beaver-headers...
  • Plugin version: 3.05
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Sep 19, 2017
  • Latest release: Jul 3, 2022
  • Number of updates: 9
  • Update frequency: every 196.0 days
  • Top authors: jatacid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /7,410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.42ms] Passed 4 tests

Server-side resources used by J7 Beaver Header Footer Templates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.85 ▼2.63
Dashboard /wp-admin3.32 ▼0.0350.32 ▼9.68
Posts /wp-admin/edit.php3.37 ▲0.0144.55 ▼6.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.36 ▼19.00
Media Library /wp-admin/upload.php3.24 ▲0.0140.67 ▲3.51

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by J7 Beaver Header Footer Templates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.54 ▲0.161.69 ▼0.1544.02 ▲0.34
Dashboard /wp-admin2,198 ▲215.58 ▼0.0391.51 ▼2.6137.97 ▼1.77
Posts /wp-admin/edit.php2,103 ▼02.03 ▼0.0236.60 ▼1.5331.56 ▼9.10
Add New Post /wp-admin/post-new.php1,534 ▲323.38 ▲0.18667.22 ▼20.8950.49 ▼6.78
Media Library /wp-admin/upload.php1,403 ▼04.22 ▼0.06114.48 ▲9.9247.99 ▲2.14

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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
Even though everything seems fine, this is not 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 fix the following items
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-customizer-footer.php:5
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-customizer-footer.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_site_option() in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-functions.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'FLCustomizer' not found in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-functions-header.php:23
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-customizer-content.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'FLCustomizer' not found in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-functions-content.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-customizer.php:28
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-customizer-content.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-customizer-header.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'FLCustomizer' not found in wp-content/plugins/j7-beaver-headers-footers/plugin/j7-headers-footers-functions-footer.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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
7 plugin tags: footers, headers, usability, beaver builder, templates...

j7-beaver-headers-footers/j7-headers-footers.php 85% from 13 tests

Analyzing the main PHP file in "J7 Beaver Header Footer Templates" version 3.05
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("j7-beaver-headers-footers.php" instead of "j7-headers-footers.php")
  • 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 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin752 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9260126752

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
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%
Functions16
▷ Named functions16100.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
No PNG files were detected