72% optimizely-project-snippet-embedder

Code Review | Optimizely Snippet Embedder

WordPress plugin Optimizely Snippet Embedder scored 72% from 54 tests.

About plugin

  • Plugin page: optimizely-projec...
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.2
  • WordPress version: 5.9.2
  • First release: Mar 11, 2015
  • Latest release: Apr 21, 2015
  • Number of updates: 14
  • Update frequency: every 2.9 days
  • Top authors: michaelkjeldsen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.22MB] [CPU: ▼325.72ms] Passed 4 tests

An overview of server-side resources used by Optimizely Snippet Embedder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0356.38 ▲4.79
Dashboard /wp-admin3.12 ▼0.2916.82 ▼19.81
Posts /wp-admin/edit.php3.12 ▼0.5217.19 ▼20.12
Add New Post /wp-admin/post-new.php3.12 ▼3.8818.45 ▼1,255.33
Media Library /wp-admin/upload.php3.12 ▼0.1816.96 ▼7.63
Optimizely Snippet Embedder /wp-admin/tools.php?page=mchl-optimizely-snippet-embedder3.1217.73

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
mchl_optimizely_data

Browser metrics Passed 4 tests

An overview of browser requirements for Optimizely Snippet Embedder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,805 ▲5115.88 ▲0.196.24 ▼0.122.30 ▼0.59
Dashboard /wp-admin2,912 ▲546.20 ▼0.01117.07 ▼19.20158.54 ▼2.97
Posts /wp-admin/edit.php2,711 ▲173.23 ▼0.1262.99 ▼0.82138.33 ▼0.75
Add New Post /wp-admin/post-new.php1,723 ▲6220.81 ▲5.14441.63 ▲13.88163.25 ▲11.24
Media Library /wp-admin/upload.php1,718 ▲175.48 ▼0.06139.75 ▼2.98182.67 ▼2.63
Optimizely Snippet Embedder /wp-admin/tools.php?page=mchl-optimizely-snippet-embedder1,0892.6156.31141.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
    • > GET request to /wp-admin/tools.php?page=mchl-optimizely-snippet-embedder
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/optimizely-project-snippet-embedder/index.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/optimizely-project-snippet-embedder/mchl-optimizely-snippet-embedder.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 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
7 plugin tags: split testing, mvt test, optimizely, splittest, ab testing...

optimizely-project-snippet-embedder/mchl-optimizely-snippet-embedder.php 85% from 13 tests

The primary PHP file in "Optimizely Snippet Embedder" version 1.1.6 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("optimizely-project-snippet-embedder.php" instead of "mchl-optimizely-snippet-embedder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin114 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22027114

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected