78% foxdell-folio-block-editor-customiser

Code Review | Foxdell Folio Block Editor Customiser

WordPress plugin Foxdell Folio Block Editor Customiser scored78%from 54 tests.

About plugin

  • Plugin page: foxdell-folio-blo...
  • Plugin version: 1.6.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 19, 2019
  • Latest release: Nov 27, 2019
  • Number of updates: 23
  • Update frequency: every 3.0 days
  • Top authors: chris.odell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 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.23MB] [CPU: ▲0.91ms] Passed 4 tests

A check of server-side resources used by Foxdell Folio Block Editor Customiser
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2145.64 ▲6.39
Dashboard /wp-admin3.58 ▲0.2753.78 ▲9.41
Posts /wp-admin/edit.php3.64 ▲0.2855.32 ▲4.43
Add New Post /wp-admin/post-new.php6.10 ▲0.2189.66 ▼16.18
Media Library /wp-admin/upload.php3.44 ▲0.2143.07 ▲8.99
Add Ons /wp-admin/admin.php?page=fofo_bec_plugin_page_addons3.4438.77
Themes /wp-admin/admin.php?page=fofo_bec_plugin_page_themes3.4437.87
Block Editor Customiser /wp-admin/admin.php?page=fofo_bec_plugin_page3.5439.79

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 10 new options
New WordPress options
FOFO_BEC_CURRENT_THEME
widget_theysaidso_widget
FOFO_BEC_THEME_REGISTER
widget_recent-posts
FOFO_BEC_JS_KEY
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
FOFO_BEC_ADDON_REGISTER
db_upgraded

Browser metrics Passed 4 tests

Foxdell Folio Block Editor Customiser: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21623.81 ▲9.071.87 ▼0.0742.86 ▲2.36
Dashboard /wp-admin2,377 ▲22213.12 ▲7.47313.73 ▲216.9468.90 ▲28.93
Posts /wp-admin/edit.php2,318 ▲22611.70 ▲9.69117.09 ▲72.8233.94 ▼2.13
Add New Post /wp-admin/post-new.php1,560 ▲4123.04 ▼0.05521.86 ▼145.1638.44 ▼22.17
Media Library /wp-admin/upload.php1,554 ▲16614.36 ▲10.11153.71 ▲43.9545.21 ▼2.78
Add Ons /wp-admin/admin.php?page=fofo_bec_plugin_page_addons1,02913.35104.9826.92
Themes /wp-admin/admin.php?page=fofo_bec_plugin_page_themes1,04213.3092.5724.37
Block Editor Customiser /wp-admin/admin.php?page=fofo_bec_plugin_page1,12213.31104.4128.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 10 options in the database
    • FOFO_BEC_ADDON_REGISTER
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • FOFO_BEC_JS_KEY
    • FOFO_BEC_CURRENT_THEME
    • FOFO_BEC_THEME_REGISTER
    • theysaidso_admin_options

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 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/foxdell-folio-block-editor-customiser/includes/fofo-bec-default-theme.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=fofo_bec_plugin_page
    • > Javascript (severe) in unknown
    /wp-content/plugins/foxdell-folio-block-editor-customiser/js/fofobec.js?ver=1.0.2 95:25 Uncaught ReferenceError: fofobec_function_dispatcher is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Screenshot #1 (The FoFo Block Customiser screen (1.png).) image required
The official readme.txt is a good inspiration

foxdell-folio-block-editor-customiser/fofo-block-editor-customiser.php 85% from 13 tests

The main file in "Foxdell Folio Block Editor Customiser" v. 1.6.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("foxdell-folio-block-editor-customiser.php" instead of "fofo-block-editor-customiser.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
No dangerous file extensions were detected1,068 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP154201,1771,003
JavaScript1261965

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.23
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods99
▷ Static methods1010.10%
▷ Public methods7272.73%
▷ Protected methods00.00%
▷ Private methods2727.27%
Functions26
▷ Named functions415.38%
▷ Anonymous functions2284.62%
Constants41
▷ Global constants41100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/1.PNG21.18KB8.83KB▼ 58.29%