84% lana-demo

Code Review | Lana Demo

WordPress plugin Lana Demo scored84%from 54 tests.

About plugin

  • Plugin page: lana-demo
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Oct 11, 2016
  • Latest release: Aug 9, 2018
  • Number of updates: 35
  • Update frequency: every 19.1 days
  • Top authors: lanadesign (77.14%)lanacodes (25.71%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▲0.90ms] Passed 4 tests

An overview of server-side resources used by Lana Demo
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.31 ▲2.85
Dashboard /wp-admin3.38 ▲0.0466.12 ▲9.71
Posts /wp-admin/edit.php3.49 ▲0.1445.85 ▼4.57
Add New Post /wp-admin/post-new.php5.96 ▲0.0890.89 ▲4.43
Media Library /wp-admin/upload.php3.30 ▲0.0834.97 ▲0.90

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Lana Demo
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.76 ▼0.031.71 ▲0.0944.24 ▼3.39
Dashboard /wp-admin2,213 ▲225.85 ▼0.2099.83 ▼4.3340.25 ▼5.43
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0436.98 ▼5.6236.51 ▲0.12
Add New Post /wp-admin/post-new.php1,536 ▼623.14 ▲4.98595.00 ▼27.5651.84 ▲3.07
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0697.63 ▲0.5742.64 ▼4.51
Lana Demo /wp-admin/lana-demo-settings.php260.440.0713.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/lana-demo-settings.php
    • > Network (severe)
    wp-admin/lana-demo-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #2, #3 in lana-demo/assets to your readme.txt
The official readme.txt might help

lana-demo/lana-demo.php Passed 13 tests

The main PHP file in "Lana Demo" ver. 1.0.9 adds more information about the plugin and also serves as the entry point for this plugin
52 characters long description:
Demo user with editable roles and dashboard widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin361 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP181109354
CSS1007

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 compressed PNG file occupies 0.03MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/plugin-header.png28.91KB29.86KB0.00%