84% post-layouts

Code Review | Post Layouts for Gutenberg

WordPress plugin Post Layouts for Gutenberg scored84%from 54 tests.

About plugin

  • Plugin page: post-layouts
  • Plugin version: 1.2.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2018
  • Latest release: Oct 5, 2023
  • Number of updates: 19
  • Update frequency: every 95.7 days
  • Top authors: techeshta (78.95%)alkesh7 (26.32%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10,000+ active /17,051 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼0.21ms] Passed 4 tests

This is a short check of server-side resources used by Post Layouts for Gutenberg
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2542.05 ▲0.08
Dashboard /wp-admin3.54 ▲0.2448.51 ▼2.02
Posts /wp-admin/edit.php3.65 ▲0.3049.61 ▲1.53
Add New Post /wp-admin/post-new.php6.13 ▲0.2595.88 ▼0.45
Media Library /wp-admin/upload.php3.46 ▲0.2341.82 ▲6.79

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

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

Browser metrics Passed 4 tests

Post Layouts for Gutenberg: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3514.46 ▲0.161.59 ▼0.9045.97 ▼1.57
Dashboard /wp-admin2,200 ▲125.89 ▼0.1297.08 ▼19.5341.89 ▼4.46
Posts /wp-admin/edit.php2,092 ▲31.98 ▼0.0340.83 ▼0.6035.47 ▲1.06
Add New Post /wp-admin/post-new.php6,361 ▲4,84729.70 ▲6.14974.75 ▲275.0538.21 ▼13.67
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.05105.42 ▼9.7241.95 ▼8.45

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • post_layouts_gutenberg_do_activation_redirect
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      require(): Failed opening required 'PL_DIRsrc/pl-helper/class-pl-helper.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-layouts/src/pl-helper/class-pl-loader.php on line 50
    • > PHP Warning
      require(PL_DIRsrc/pl-helper/class-pl-config.php): failed to open stream: No such file or directory in wp-content/plugins/post-layouts/src/pl-helper/class-pl-helper.php on line 70
    • > PHP Warning
      require(PL_DIRsrc/pl-helper/class-pl-helper.php): failed to open stream: No such file or directory in wp-content/plugins/post-layouts/src/pl-helper/class-pl-loader.php on line 50
    • > PHP Warning
      Use of undefined constant PL_DIR - assumed 'PL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-layouts/src/pl-helper/class-pl-loader.php on line 50
    • > PHP Warning
      Use of undefined constant PL_DIR - assumed 'PL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-layouts/src/pl-helper/class-pl-helper.php on line 70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-layouts/src/blocks/index.php:1120
    • > PHP Fatal error
      require(): Failed opening required 'PL_DIRsrc/pl-helper/class-pl-config.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-layouts/src/pl-helper/class-pl-helper.php on line 70

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: post templates, grid layout, post blocks, list layout, gutenberg block...

post-layouts/post-layouts.php Passed 13 tests

The main file in "Post Layouts for Gutenberg" v. 1.2.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
115 characters long description:
A beautiful post layouts block to showcase your posts in grid and list layout with multiple templates availability.

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
Good job! No executable or dangerous file extensions detected20,613 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,204
CSS141,850504,360
SVG3003,927
Sass436522,150
JavaScript12173521,581
PHP103565081,391

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity6.57
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes342.86%
Methods25
▷ Static methods1248.00%
▷ Public methods2496.00%
▷ Protected methods00.00%
▷ Private methods14.00%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants3
▷ Global constants3100.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
There were not PNG files found in your plugin