78% addon-library-layouts

Code Review | Addon Library Layouts Builder

WordPress plugin Addon Library Layouts Builder scored 78% from 54 tests.

About plugin

  • Plugin page: addon-library-lay...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2017
  • Latest release: Jul 9, 2018
  • Number of updates: 6
  • Update frequency: every 82.5 days
  • Top authors: unitecms (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 2,669 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.56ms] Passed 4 tests

Analyzing server-side resources used by Addon Library Layouts Builder
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.79 ▼1.36
Dashboard /wp-admin3.32 ▲0.0244.38 ▼8.70
Posts /wp-admin/edit.php3.37 ▲0.0146.82 ▲2.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.63 ▼6.86
Media Library /wp-admin/upload.php3.24 ▲0.0137.87 ▲4.13

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Addon Library Layouts Builder
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.31 ▼1.331.77 ▼0.0243.44 ▼6.62
Dashboard /wp-admin2,222 ▲345.84 ▲0.94107.46 ▼8.7241.27 ▼4.64
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0538.25 ▲0.1735.09 ▲1.06
Add New Post /wp-admin/post-new.php1,527 ▼1017.71 ▼5.56638.76 ▼2.7363.65 ▲4.55
Media Library /wp-admin/upload.php1,404 ▲134.13 ▼0.0893.75 ▼10.6542.25 ▼4.82

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

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/addon-library-layouts/inc_php/admin.class.php
    • > /wp-content/plugins/addon-library-layouts/inc_php/plugin.class.php
    • > /wp-content/plugins/addon-library-layouts/inc_php/main_file.php
    • > /wp-content/plugins/addon-library-layouts/inc_php/globals.class.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/addon-library-layouts/inc_php/globals.class.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/addon-library-layouts/inc_php/globals.class.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/addon-library-layouts/views/standalone.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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === addon-library-layouts === )
You can look at the official readme.txt

addon-library-layouts/addon-library-layouts.php Passed 13 tests

Analyzing the main PHP file in "Addon Library Layouts Builder" version 1.1.3
81 characters long description:
Addon Library Layouts Builder - Create and edit layouts from addon library addons

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin451 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP7297186437
JavaScript114714

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods3179.49%
▷ Public methods3179.49%
▷ Protected methods615.38%
▷ Private methods25.13%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin