84% layers

Code Review | Layers

WordPress plugin Layers scored84%from 54 tests.

About plugin

  • Plugin page: layers
  • Plugin version: 0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jul 5, 2017
  • Latest release: Jan 23, 2022
  • Number of updates: 15
  • Update frequency: every 110.9 days
  • Top authors: stripeswp (93.33%)Otto42 (13.33%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.31ms] Passed 4 tests

An overview of server-side resources used by Layers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.23 ▲1.13
Dashboard /wp-admin3.32 ▲0.0248.68 ▼10.27
Posts /wp-admin/edit.php3.37 ▲0.0248.16 ▼5.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0286.86 ▼8.32
Media Library /wp-admin/upload.php3.25 ▲0.0237.04 ▼1.00

Server storage [IO: ▲0.01MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Layers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.001.81 ▲0.0247.01 ▲2.13
Dashboard /wp-admin2,192 ▲155.61 ▼0.0595.94 ▼0.6242.77 ▼0.99
Posts /wp-admin/edit.php2,079 ▼212.00 ▼0.0234.46 ▼2.6531.33 ▼3.87
Add New Post /wp-admin/post-new.php1,526 ▼223.78 ▲0.71665.79 ▲37.0161.26 ▼10.84
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0097.56 ▼3.8042.72 ▼1.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/layers/layers-template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: panels, sections, layers, panel, layer...

layers/layers.php 92% from 13 tests

Analyzing the main PHP file in "Layers" version 0.5
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin115 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2318115

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin