73% surbma-optimonk

Code Review | Surbma | OptiMonk

WordPress plugin Surbma | OptiMonk scored73%from 54 tests.

About plugin

  • Plugin page: surbma-optimonk
  • Plugin version: 2.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2
  • WordPress version: 6.3.1
  • First release: Mar 31, 2015
  • Latest release: Apr 8, 2023
  • Number of updates: 22
  • Update frequency: every 133.2 days
  • Top authors: Surbma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Surbma | OptiMonk
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0040.94 ▼0.50
Dashboard /wp-admin3.59 ▲0.0347.71 ▼4.43
Posts /wp-admin/edit.php3.70 ▲0.0252.01 ▲0.65
Add New Post /wp-admin/post-new.php6.17 ▲0.0297.90 ▼3.02
Media Library /wp-admin/upload.php3.51 ▲0.0240.83 ▲2.14
OptiMonk Settings /wp-admin/options-general.php?page=surbma-optimonk-settings3.4632.35

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Surbma | OptiMonk
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.75 ▲0.131.79 ▼0.3941.31 ▼5.10
Dashboard /wp-admin2,199 ▲195.65 ▲0.0598.98 ▲11.0042.35 ▼0.70
Posts /wp-admin/edit.php2,101 ▼21.99 ▼0.1039.96 ▼1.0935.30 ▼5.08
Add New Post /wp-admin/post-new.php1,557 ▲1718.67 ▲0.02631.60 ▼18.2353.33 ▼3.49
Media Library /wp-admin/upload.php1,407 ▲44.24 ▲0.02103.44 ▼2.3945.60 ▲2.30
OptiMonk Settings /wp-admin/options-general.php?page=surbma-optimonk-settings8422.1327.2531.06

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=surbma-optimonk-settings
    • > Notice in wp-content/plugins/surbma-optimonk/pages/settings-page.php+48
    Trying to access array offset on value of type bool

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/surbma-optimonk/surbma-optimonk.php
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant SURBMA_OPTIMONK_PLUGIN_DIR - assumed 'SURBMA_OPTIMONK_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/surbma-optimonk/lib/admin.php on line 3
    • > PHP Warning
      include_once(): Failed opening 'SURBMA_OPTIMONK_PLUGIN_DIR/pages/settings-page.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/surbma-optimonk/lib/admin.php on line 3
    • > PHP Warning
      include_once(SURBMA_OPTIMONK_PLUGIN_DIR/pages/settings-page.php): failed to open stream: No such file or directory in wp-content/plugins/surbma-optimonk/lib/admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-optimonk/lib/admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surbma-optimonk/pages/settings-page.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: popup, pop up, exit intent, newsletter, optimonk

surbma-optimonk/surbma-optimonk.php Passed 13 tests

The primary PHP file in "Surbma | OptiMonk" version 2.1 is used by WordPress to initiate all plugin functionality
22 characters long description:
OptiMonk for WordPress

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 plugin141 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3241783
PO File1184155
Markdown1103

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png5.98KB3.45KB▼ 42.42%