84% reusable-layouts-for-siteorigin

Code Review | Reusable Layouts for SiteOrigin

WordPress plugin Reusable Layouts for SiteOrigin scored 84% from 54 tests.

About plugin

  • Plugin page: reusable-layouts-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2018
  • Latest release: Apr 5, 2019
  • Number of updates: 9
  • Update frequency: every 14.0 days
  • Top authors: echelonso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 1,877 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.83ms] Passed 4 tests

A check of server-side resources used by Reusable Layouts for SiteOrigin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.83 ▼2.33
Dashboard /wp-admin3.34 ▲0.0444.71 ▼9.08
Posts /wp-admin/edit.php3.39 ▲0.0447.29 ▲3.42
Add New Post /wp-admin/post-new.php5.92 ▲0.0482.90 ▼11.06
Media Library /wp-admin/upload.php3.26 ▲0.0431.50 ▼0.83
Reusable Layouts /wp-admin/edit.php?post_type=echelonso_layout3.3137.20

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Reusable Layouts for SiteOrigin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.27 ▼1.041.79 ▼0.0936.60 ▼8.96
Dashboard /wp-admin2,213 ▲225.88 ▲0.9896.75 ▼5.4436.83 ▼8.90
Posts /wp-admin/edit.php2,096 ▲72.10 ▲0.1040.06 ▲5.4835.22 ▲0.82
Add New Post /wp-admin/post-new.php1,548 ▲1218.45 ▼4.75605.39 ▼37.4955.30 ▲1.46
Media Library /wp-admin/upload.php1,398 ▲104.19 ▼0.0796.82 ▼15.8441.33 ▼5.69
Reusable Layouts /wp-admin/edit.php?post_type=echelonso_layout1,0761.9530.5829.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reusable-layouts-for-siteorigin/reusable-layouts-for-siteorigin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function absint() in wp-content/plugins/reusable-layouts-for-siteorigin/widgets/eso-render-layout/tpl/tpl.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/reusable-layouts-for-siteorigin/widgets/eso-render-layout/eso-render-layout.php:10

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed: You can look at the official readme.txt

reusable-layouts-for-siteorigin/reusable-layouts-for-siteorigin.php Passed 13 tests

The main PHP script in "Reusable Layouts for SiteOrigin" version 1.0.4 is automatically included on every request by WordPress
56 characters long description:
SiteOrigin layouts your can build once and use anywhere.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin119 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP33440119

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin