84% byakurai-template-filter

Code Review | byakurai template filter

WordPress plugin byakurai template filter scored 84% from 54 tests.

About plugin

  • Plugin page: byakurai-template...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2023
  • Latest release: Jan 29, 2023
  • Number of updates: 22
  • Update frequency: every 0.5 days
  • Top authors: yukimichi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 514 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.63ms] Passed 4 tests

This is a short check of server-side resources used by byakurai template filter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.79 ▼14.15
Dashboard /wp-admin3.37 ▲0.0648.67 ▼3.57
Posts /wp-admin/edit.php3.48 ▲0.1246.68 ▲3.80
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.21 ▲2.44
Media Library /wp-admin/upload.php3.29 ▲0.0637.76 ▲0.77
byakurai template filter option /wp-admin/options-general.php?page=byakurai_template-filter3.2529.42

Server storage [IO: ▲0.24MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
byakuraitmp_template_ids

Browser metrics Passed 4 tests

An overview of browser requirements for byakurai template filter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8114.47 ▲0.091.56 ▼0.6038.39 ▼11.86
Dashboard /wp-admin2,222 ▲315.86 ▲0.04115.54 ▲13.0744.12 ▼5.03
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0134.27 ▼2.6636.33 ▲4.12
Add New Post /wp-admin/post-new.php1,536 ▲323.34 ▲0.38653.60 ▼34.0157.17 ▲2.93
Media Library /wp-admin/upload.php1,401 ▲134.25 ▲0.0296.28 ▼20.4339.81 ▼10.35
byakurai template filter option /wp-admin/options-general.php?page=byakurai_template-filter8332.0528.2026.50

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • byakuraitmp_template_ids
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/byakurai-template-filter/assets/minify/src/JS.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/byakurai-template-filter/assets/path-converter/src/Converter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/byakurai-template-filter/assets/minify/src/Exceptions/IOException.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'MatthiasMullie\\PathConverter\\ConverterInterface' not found in wp-content/plugins/byakurai-template-filter/assets/path-converter/src/NoConverter.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exception' not found in wp-content/plugins/byakurai-template-filter/assets/minify/src/Exceptions/BasicException.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Exceptions\\BasicException' not found in wp-content/plugins/byakurai-template-filter/assets/minify/src/Exceptions/FileImportException.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'MatthiasMullie\\Minify\\Minify' not found in wp-content/plugins/byakurai-template-filter/assets/minify/src/CSS.php:29

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There were no tags found
The official readme.txt is a good inspiration

byakurai-template-filter/byakurai-template-filter.php 92% from 13 tests

"byakurai template filter" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 264 characters long)

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
Success! There were no dangerous files found in this plugin1,581 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP193991,2621,476
PO File1343485
CSS12012
XML1208

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes9
▷ Abstract classes333.33%
▷ Concrete classes666.67%
▷ Final classes00.00%
Methods52
▷ Static methods11.92%
▷ Public methods1630.77%
▷ Protected methods3669.23%
▷ Private methods00.00%
Functions40
▷ Named functions2767.50%
▷ Anonymous functions1332.50%
Constants28
▷ Global constants2796.43%
▷ Class constants13.57%
▷ Public constants1100.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 images were found in this plugin