89% insert-code-lite

Code Review | Insert Code Lite

WordPress plugin Insert Code Lite scored 89% from 54 tests.

About plugin

  • Plugin page: insert-code-lite
  • Plugin version: 0.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-5.0
  • WordPress version: 5.8.1
  • First release: Sep 15, 2014
  • Latest release: Dec 4, 2018
  • Number of updates: 11
  • Update frequency: every 140.1 days
  • Top authors: iamdmitrymayorov (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 4,493 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼140.63ms] Passed 4 tests

This is a short check of server-side resources used by Insert Code Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.78 ▲0.0626.16 ▼0.85
Dashboard /wp-admin3.11 ▲0.0543.55 ▼1.32
Posts /wp-admin/edit.php3.23 ▲0.1145.25 ▲0.92
Add New Post /wp-admin/post-new.php5.47 ▲0.0386.13 ▼558.55
Media Library /wp-admin/upload.php3.06 ▲0.0530.45 ▼1.78
Insert Code /wp-admin/options-general.php?page=iclp_code3.0226.83

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Insert Code Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.87 ▲0.219.74 ▼1.3150.20 ▼3.07
Dashboard /wp-admin2,975 ▲445.98 ▲0.04139.37 ▼4.62114.54 ▲9.66
Posts /wp-admin/edit.php2,741 ▲22.71 ▼0.0060.00 ▼8.6386.05 ▼3.20
Add New Post /wp-admin/post-new.php1,675 ▲17518.85 ▲0.25375.67 ▼4.09107.81 ▼9.90
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.02145.24 ▼3.68121.58 ▼3.19
Insert Code /wp-admin/options-general.php?page=iclp_code1,0472.0654.0484.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=iclp_code
    • > Notice in wp-content/plugins/insert-code-lite/admin/class-insert-code-lite-admin.php+153
    Trying to access array offset on value of type bool

SRP 50% 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
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 esc_html_e() in wp-content/plugins/insert-code-lite/admin/partials/insert-code-lite-admin-display.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: html5, analytics, tracking code, html, javascript...

insert-code-lite/insert-code-lite.php Passed 13 tests

"Insert Code Lite" version 0.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
62 characters long description:
Simple way of adding custom scipts and styles to your website.

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
Good job! No executable or dangerous file extensions detected257 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP861407210
PO File1111347

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.60
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
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
There were not PNG files found in your plugin