10% segmentlab-extension

Code Review | SegmentLab Extension

WordPress plugin SegmentLab Extension scored 10% from 54 tests.

About plugin

  • Plugin page: segmentlab-extension
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.0.3
  • WordPress version: 5.9.2
  • First release: Jan 23, 2019
  • Latest release: Feb 9, 2019
  • Number of updates: 40
  • Update frequency: every 1.3 days
  • Top authors: segmentlab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 360 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/segmentlab-extension/segment-lab-extension.php+2742
    syntax error, unexpected 'default' (T_DEFAULT)

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

This is a short check of server-side resources used by SegmentLab Extension
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0161.52 ▼1.50
Dashboard /wp-admin3.41 ▲0.0039.91 ▲2.26
Posts /wp-admin/edit.php3.64 ▲0.0056.79 ▲15.28
Add New Post /wp-admin/post-new.php6.88 ▼0.0996.74 ▼1,161.61
Media Library /wp-admin/upload.php3.29 ▲0.0048.95 ▼10.92

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SegmentLab Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2715.51 ▼0.245.64 ▼2.082.75 ▼0.04
Dashboard /wp-admin2,881 ▲276.09 ▼0.18113.87 ▼45.16155.11 ▼20.44
Posts /wp-admin/edit.php2,694 ▲33.25 ▲0.0263.67 ▼0.94145.57 ▼9.29
Add New Post /wp-admin/post-new.php1,668 ▼9118.22 ▼3.12386.54 ▼75.09173.38 ▲15.87
Media Library /wp-admin/upload.php1,695 ▼05.50 ▼0.05135.68 ▼34.44182.30 ▼13.83

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 validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5600
    WP_User->id was called with an argument that is deprecated since version 2.1.0! Use WP_User->ID instead.

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/segmentlab-extension/images/index.php
    • > /wp-content/plugins/segmentlab-extension/index.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected 'default' (T_DEFAULT) in wp-content/plugins/segmentlab-extension/segment-lab-extension.php on line 2742

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Screenshot #3 (SegmentLab statistics) image required
Please take inspiration from this readme.txt

segmentlab-extension/segment-lab-extension.php 69% from 13 tests

The entry point to "SegmentLab Extension" version 1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 228 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("segmentlab-extension.php" instead of "segment-lab-extension.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin4,343 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33442004,279
JavaScript19161
CSS1103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity4.36
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.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
5 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/segmentlab_icon.png6.61KB2.97KB▼ 55.06%
images/arrow_up.png0.79KB0.65KB▼ 17.99%
images/logotestbeta.png28.68KB5.59KB▼ 80.52%
images/help_icon.png1.54KB0.68KB▼ 56.13%
images/arrow_down.png0.83KB0.63KB▼ 23.58%