10% light-and-smart

Code Review | Light And Smart

WordPress plugin Light And Smart scored 10% from 54 tests.

About plugin

  • Plugin page: light-and-smart
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4.2
  • WordPress version: 5.8.1
  • First release: Jul 29, 2020
  • Latest release: Aug 3, 2020
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: aliveic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 195 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/light-and-smart/light-and-smart.php+229
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.81MB] [CPU: ▼184.87ms] Passed 4 tests

Server-side resources used by Light And Smart
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.82 ▼1.028.17 ▼25.71
Dashboard /wp-admin1.84 ▼1.226.25 ▼38.51
Posts /wp-admin/edit.php1.84 ▼1.2711.66 ▼23.67
Add New Post /wp-admin/post-new.php1.84 ▼3.597.20 ▼643.56
Media Library /wp-admin/upload.php1.84 ▼1.175.94 ▼31.69
Light & Smart Settings /wp-admin/options-general.php?page=light-smart-settings1.846.05

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Light And Smart
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,712 ▲11615.91 ▲0.329.38 ▲2.3652.07 ▲7.53
Dashboard /wp-admin2,980 ▲465.91 ▼0.01140.57 ▼0.51128.28 ▲8.55
Posts /wp-admin/edit.php2,746 ▲72.69 ▼0.0166.63 ▼4.4097.58 ▲8.60
Add New Post /wp-admin/post-new.php1,677 ▲17718.87 ▲0.09380.81 ▲23.80111.37 ▲1.25
Media Library /wp-admin/upload.php1,814 ▲75.00 ▼0.03150.19 ▼8.11125.65 ▼3.56
Light & Smart Settings /wp-admin/options-general.php?page=light-smart-settings1,1082.0956.8679.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/light-and-smart/light-and-smart.php+229
    Trying to access array offset on value of type bool

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=light-smart-settings
    • > Notice in wp-content/plugins/light-and-smart/light-and-smart.php+345
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× 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/light-and-smart/light-and-smart.php:35

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)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=light-smart-settings
    • > Network (severe)
    wp-content/plugins/light-and-smart/assets/css/admin-style.css?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: facebook pixel, remove, wp-emoji, lean, generator...

light-and-smart/light-and-smart.php 92% from 13 tests

The main PHP script in "Light And Smart" version 0.1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
There were no executable files found in this plugin264 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26754264

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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
No PNG images were found in this plugin