84% unik-post-layout

Code Review | Unik Post Layout

WordPress plugin Unik Post Layout scored84%from 54 tests.

About plugin

  • Plugin page: unik-post-layout
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: May 21, 2021
  • Latest release: Feb 5, 2022
  • Number of updates: 6
  • Update frequency: every 43.5 days
  • Top authors: unikforce (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.11MB] [CPU: ▼10.70ms] Passed 4 tests

This is a short check of server-side resources used by Unik Post Layout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.89 ▼0.5719.58 ▼24.45
Dashboard /wp-admin3.36 ▲0.0148.44 ▼17.53
Posts /wp-admin/edit.php3.47 ▲0.1149.52 ▼1.96
Add New Post /wp-admin/post-new.php5.94 ▲0.0593.11 ▲4.57
Media Library /wp-admin/upload.php3.28 ▲0.0537.48 ▲1.16

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Unik Post Layout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,456 ▼29013.28 ▼1.100.64 ▼1.0119.87 ▼26.08
Dashboard /wp-admin2,206 ▲155.01 ▲0.14101.55 ▼3.0438.66 ▲3.84
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0140.58 ▲2.3132.84 ▼1.54
Add New Post /wp-admin/post-new.php1,547 ▲1118.37 ▼4.47654.51 ▲57.9978.76 ▲19.64
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0996.08 ▼7.6845.22 ▲1.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • 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)
Good news, no errors were detected

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/unik-post-layout/widgets/layout2/view.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/unik-post-layout/widgets/layout1/view.php:2

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: elementor posts, wp elementor addon, wordpress post layout, elementor post layout

unik-post-layout/unik-post-layout.php 92% from 13 tests

"Unik Post Layout" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,672 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP71351221,430
CSS4420219
JavaScript3141023

PHP code Passed 2 tests

An overview 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.21
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods28
▷ Static methods13.57%
▷ Public methods2175.00%
▷ Protected methods414.29%
▷ Private methods310.71%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.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
No PNG files were detected