83% optinmagic

Code Review | Popup Builder for Lead Generation by OptinMagic - Generate Leads, Increase Sale and Grow Mailing List

WordPress plugin Popup Builder for Lead Generation by OptinMagic - Generate Leads, Increase Sale and Grow Mailing List scored83%from 54 tests.

About plugin

  • Plugin page: optinmagic
  • Plugin version: 0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 25, 2023
  • Latest release: Apr 2, 2023
  • Number of updates: 4
  • Update frequency: every 2.2 days
  • Top authors: optinmagic (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /148 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.13ms] Passed 4 tests

Analyzing server-side resources used by Popup Builder for Lead Generation by OptinMagic - Generate Leads, Increase Sale and Grow Mailing List
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.05 ▼5.78
Dashboard /wp-admin3.34 ▲0.0346.75 ▼13.81
Posts /wp-admin/edit.php3.39 ▲0.0348.92 ▼0.15
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.45 ▼0.76
Media Library /wp-admin/upload.php3.26 ▲0.0338.07 ▲2.69

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Popup Builder for Lead Generation by OptinMagic - Generate Leads, Increase Sale and Grow Mailing List
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.21 ▼1.041.70 ▼0.0240.78 ▼3.13
Dashboard /wp-admin2,222 ▲344.88 ▼0.94113.17 ▼1.7445.88 ▼2.02
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0140.45 ▲4.6837.04 ▲0.29
Add New Post /wp-admin/post-new.php1,547 ▲3323.58 ▲6.04590.32 ▼49.0957.54 ▲1.54
Media Library /wp-admin/upload.php1,407 ▲194.17 ▼0.0295.07 ▼4.9842.45 ▼0.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/optinmagic/optinmagic.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt is a good inspiration

optinmagic/optinmagic.php 85% from 13 tests

"Popup Builder for Lead Generation by OptinMagic - Generate Leads, Increase Sale and Grow Mailing List" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Plugin Name: Please shorten the plugin name (currently 101 characters long instead of max. 70)
  • Description: The description should be shorter than 140 characters (currently 154 characters long)

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
Good job! No executable or dangerous file extensions detected19,760 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31,6152,50819,113
PHP24929468
CSS336119
PO File1202060

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.25
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/opm-logo.png9.83KB5.81KB▼ 40.88%
images/logo.png9.35KB8.70KB▼ 6.96%