82% postlay-automatic-blog-post-layout-addon

Code Review | PostLay - Automatic Blog Post Layout Addon For Wordpress

WordPress plugin PostLay - Automatic Blog Post Layout Addon For Wordpress scored82%from 54 tests.

About plugin

  • Plugin page: postlay-automatic...
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Aug 9, 2022
  • Latest release: Sep 13, 2022
  • Number of updates: 35
  • Update frequency: every 1.0 days
  • Top authors: netrosoft (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /268 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.80ms] Passed 4 tests

A check of server-side resources used by PostLay - Automatic Blog Post Layout Addon For Wordpress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.49 ▲1.94
Dashboard /wp-admin3.42 ▲0.0743.29 ▼13.89
Posts /wp-admin/edit.php3.47 ▲0.1145.60 ▲0.42
Add New Post /wp-admin/post-new.php6.02 ▲0.1390.90 ▼7.19
Media Library /wp-admin/upload.php3.34 ▲0.1135.06 ▲1.46
Add New /wp-admin/post-new.php?post_type=ncmbp3.4749.95
PostLay Settings /wp-admin/edit.php?post_type=ncmbp&page=ncmbp-settings-pages3.3136.62
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=ncmbp3.3336.80
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=ncmbp3.3333.95
All Items /wp-admin/edit.php?post_type=ncmbp3.3934.79

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
category_children
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for PostLay - Automatic Blog Post Layout Addon For Wordpress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲7813.28 ▼1.111.82 ▼0.1054.51 ▲10.82
Dashboard /wp-admin2,241 ▲645.77 ▲0.1587.64 ▲1.0683.14 ▲41.40
Posts /wp-admin/edit.php2,166 ▲662.30 ▲0.1841.52 ▲6.7736.00 ▼1.50
Add New Post /wp-admin/post-new.php1,578 ▲5223.21 ▲0.29685.03 ▲18.2634.25 ▼11.25
Media Library /wp-admin/upload.php1,458 ▲614.38 ▲0.16101.43 ▲4.1578.19 ▲35.99
Add New /wp-admin/post-new.php?post_type=ncmbp2,4038.00181.48138.16
PostLay Settings /wp-admin/edit.php?post_type=ncmbp&page=ncmbp-settings-pages2,3813.2382.9635.04
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=ncmbp1,5212.0532.8134.80
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=ncmbp1,3882.0032.1532.47
All Items /wp-admin/edit.php?post_type=ncmbp1,1852.3933.9229.28

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • category_children

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postlay-automatic-blog-post-layout-addon/inc/functions.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postlay-automatic-blog-post-layout-addon/inc/functions.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/postlay-automatic-blog-post-layout-addon/inc/netroics-dynamic-style.php:221

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

readme.txt 88% 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
Attributes that need to be fixed:
  • Donate link: Invalid url: "#"
  • Screenshots: These screenshots do not have images: #1 (Posts Settings), #2 (Back End), #3 (Front End)
The official readme.txt might help

postlay-automatic-blog-post-layout-addon/postlay-wp-blog-layout.php 69% from 13 tests

The main file in "PostLay - Automatic Blog Post Layout Addon For Wordpress" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 151 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("postlay-automatic-blog-post-layout-addon.php" instead of "postlay-wp-blog-layout.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.2")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,587 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP311635507
CSS3808386
JavaScript22523

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.57MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png79.76KB38.18KB▼ 52.13%
screenshot-2.png52.59KB26.80KB▼ 49.04%
screenshot-1.png151.73KB43.24KB▼ 71.50%
img/general-options-banner.png268.59KB113.93KB▼ 57.58%
img/menu-icon.png12.57KB5.76KB▼ 54.16%