84% goodlayers-blocks

Code Review | Goodlayers Blocks

WordPress plugin Goodlayers Blocks scored84%from 54 tests.

About plugin

  • Plugin page: goodlayers-blocks
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 30, 2022
  • Latest release: Mar 14, 2023
  • Number of updates: 5
  • Update frequency: every 22.0 days
  • Top authors: goodlayers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /607 total downloads

Benchmarks

Plugin footprint 83% 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.00ms] Passed 4 tests

This is a short check of server-side resources used by Goodlayers Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.33 ▲0.72
Dashboard /wp-admin3.32 ▼0.0253.50 ▼8.87
Posts /wp-admin/edit.php3.38 ▲0.0250.56 ▼3.17
Add New Post /wp-admin/post-new.php6.21 ▲0.3293.69 ▼12.68
Media Library /wp-admin/upload.php3.26 ▲0.0339.41 ▲3.49

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Goodlayers Blocks
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲2414.73 ▲0.352.64 ▲0.5844.83 ▲3.97
Dashboard /wp-admin2,195 ▲215.61 ▲0.0894.30 ▲4.1741.49 ▲0.06
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0235.66 ▼4.4336.35 ▲3.75
Add New Post /wp-admin/post-new.php6,219 ▲4,69319.49 ▼3.69970.98 ▲285.2139.36 ▼15.87
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.0497.92 ▼7.6043.65 ▼2.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/goodlayers-blocks/goodlayers-blocks.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/goodlayers-blocks/category-filter.php:66
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/goodlayers-blocks/util.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Contributors: Contributors not specified
The official readme.txt might help

goodlayers-blocks/goodlayers-blocks.php Passed 13 tests

"Goodlayers Blocks" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
39 characters long description:
Extra useful elements for theme styling

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
No dangerous file extensions were detected649 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP129444561
CSS111680
JavaScript8008

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.63
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin