67% walker-core

Code Review | Walker Core

WordPress plugin Walker Core scored67%from 54 tests.

About plugin

  • Plugin page: walker-core
  • Plugin version: 1.3.10
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4
  • WordPress version: 6.3.1
  • First release: May 22, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 48
  • Update frequency: every 19.0 days
  • Top authors: walkerwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /21,157 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.12MB] [CPU: ▲25.25ms] 75% from 4 tests

This is a short check of server-side resources used by Walker Core
The following require your attention
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.12MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4262.45 ▲19.55
Dashboard /wp-admin8.90 ▲5.5576.95 ▲13.30
Posts /wp-admin/edit.php8.91 ▲5.5482.33 ▲36.55
Add New Post /wp-admin/post-new.php9.85 ▲3.95121.69 ▲37.40
Media Library /wp-admin/upload.php8.91 ▲5.6767.09 ▲31.61
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius8.9165.57

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

How much does this plugin use your filesystem and database?
These are issues you should consider
  • The filesystem usage should be lower than 25MB (currently using 28.52MB)
Filesystem: 746 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
fs_active_plugins
db_upgraded
can_compress_scripts
fs_accounts
fs_debug_mode
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Walker Core
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲13413.39 ▼0.877.69 ▲5.6428.01 ▼15.49
Dashboard /wp-admin2,228 ▲515.54 ▼0.0997.20 ▲1.1444.77 ▼2.81
Posts /wp-admin/edit.php2,134 ▲342.04 ▲0.0939.16 ▲2.6538.04 ▲1.93
Add New Post /wp-admin/post-new.php1,545 ▲1722.69 ▼0.45631.30 ▲3.0657.99 ▲15.30
Media Library /wp-admin/upload.php1,433 ▲394.16 ▼0.0596.10 ▼4.1044.62 ▲1.10
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0881.6632.0032.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/walker-core/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_active_plugins
    • widget_recent-comments
    • fs_debug_mode
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • fs_accounts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Almost there! Just fix the following items
  • 76× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/walker-core/patterns/wnt-post-slider-3.php
    • > /wp-content/plugins/walker-core/patterns/pricing-table-layout.php
    • > /wp-content/plugins/walker-core/patterns/magazine-block-grid-layout.php
    • > /wp-content/plugins/walker-core/patterns/cta-block.php
    • > /wp-content/plugins/walker-core/patterns/counter-layout-full.php
    • > /wp-content/plugins/walker-core/patterns/latest-post-block-dark.php
    • > /wp-content/plugins/walker-core/patterns/magazine-block-featured-grid.php
    • > /wp-content/plugins/walker-core/patterns/blockpage-header-minimal-social.php
    • > /wp-content/plugins/walker-core/patterns/wnt-footer-large-dark.php
    • > /wp-content/plugins/walker-core/patterns/blockpage-header-logo-centered-2.php
  • 294× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WALKER_CORE_URL - assumed 'WALKER_CORE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/walker-core/patterns/blockpage-content-with-features.php on line 9
    • > PHP Warning
      Use of undefined constant WALKER_CORE_URL - assumed 'WALKER_CORE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/walker-core/patterns/blockpage-content-multiple-block.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/walker-core/patterns/blockpage-contact-withmap-3.php:14
    • > PHP Warning
      Use of undefined constant WALKER_CORE_URL - assumed 'WALKER_CORE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/walker-core/patterns/product-block-cta-layout.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/walker-core/patterns/banner-block-content-centered.php:12
    • > PHP Warning
      Use of undefined constant WALKER_CORE_URL - assumed 'WALKER_CORE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/walker-core/patterns/testimonial-block-border-style.php on line 10
    • > PHP Warning
      Use of undefined constant WALKER_CORE_URL - assumed 'WALKER_CORE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/walker-core/patterns/blockpage-pricing-layout-2.php on line 10
    • > PHP Warning
      Use of undefined constant WALKER_CORE_URL - assumed 'WALKER_CORE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/walker-core/patterns/testimonial-block-dark.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/walker-core/admin/partials/walker-charity-social-media.php:9
    • > PHP Warning
      Use of undefined constant WALKER_CORE_URL - assumed 'WALKER_CORE_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/walker-core/patterns/blockpage-brands-grid-1.php on line 12

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === walker-core === )
The official readme.txt might help

walker-core/walker-core.php Passed 13 tests

Analyzing the main PHP file in "Walker Core" version 1.3.10
127 characters long description:
Walker Core is the companion plugin for WalkerWP Themes, which provides core functionality and custom post type for the themes.

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected62,590 lines of code in 539 files:
LanguageFilesBlank linesComment linesLines of code
PHP33010,89319,17252,100
JavaScript82474898,998
CSS173791,076
Markdown1680214
JSON18000180
XML13016
SVG2006

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity65.76
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes00.00%
Methods1,347
▷ Static methods20215.00%
▷ Public methods95070.53%
▷ Protected methods171.26%
▷ Private methods38028.21%
Functions230
▷ Named functions17073.91%
▷ Anonymous functions6026.09%
Constants150
▷ Global constants10368.67%
▷ Class constants4731.33%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
119 compressed PNG files occupy 4.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/demo-data/gridchamp/pro/2/screenshot.png34.52KB36.24KB0.00%
includes/demo-data/trending-news/pro/1/screenshot.png52.49KB55.11KB0.00%
admin/images/blockpage/icon_phone.png0.68KB0.71KB0.00%
includes/demo-data/home-care/pro/1/screenshot.png42.40KB44.86KB0.00%
admin/images/blockpage/testimonial_2.png31.26KB33.30KB0.00%