87% adbase-ai-popup-growth

Code Review | SendSquared - Email Marketing, Lead Generation, Popup & Post Emailer

WordPress plugin SendSquared - Email Marketing, Lead Generation, Popup & Post Emailer scored 87% from 54 tests.

About plugin

  • Plugin page: adbase-ai-popup-g...
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 5.9.2
  • First release: Apr 15, 2020
  • Latest release: Sep 20, 2021
  • Number of updates: 22
  • Update frequency: every 23.8 days
  • Top authors: adbaseai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 428 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.23MB] [CPU: ▼297.85ms] Passed 4 tests

Server-side resources used by SendSquared - Email Marketing, Lead Generation, Popup & Post Emailer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.1656.68 ▲6.25
Dashboard /wp-admin3.37 ▼0.0423.24 ▼9.01
Posts /wp-admin/edit.php3.50 ▼0.1426.25 ▼6.96
Add New Post /wp-admin/post-new.php6.15 ▼0.8278.54 ▼1,173.22
Media Library /wp-admin/upload.php3.38 ▲0.0820.69 ▼2.21
SendSquared /wp-admin/options-general.php?page=ad-base-wordpress-modal3.3522.25

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for SendSquared - Email Marketing, Lead Generation, Popup & Post Emailer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,808 ▲5416.46 ▲0.796.83 ▲0.912.63 ▲0.04
Dashboard /wp-admin2,897 ▲436.10 ▼0.09114.94 ▼23.16153.75 ▼6.19
Posts /wp-admin/edit.php2,696 ▲83.23 ▼0.0162.43 ▲0.24138.75 ▲0.38
Add New Post /wp-admin/post-new.php1,664 ▲416.09 ▼0.83398.76 ▼20.54154.95 ▼6.90
Media Library /wp-admin/upload.php1,703 ▲55.50 ▲0.07145.83 ▲3.91192.17 ▲1.70
SendSquared /wp-admin/options-general.php?page=ad-base-wordpress-modal1,2012.3755.59113.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=ad-base-wordpress-modal
    • > Warning in wp-content/plugins/adbase-ai-popup-growth/adbase-ai-modal.php+76
    include_once(wp-content/plugins/adbase-ai-popup-growth//views/dashboard-notices.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/options-general.php?page=ad-base-wordpress-modal
    • > Warning in wp-content/plugins/adbase-ai-popup-growth/adbase-ai-modal.php+76
    include_once(): Failed opening 'wp-content/plugins/adbase-ai-popup-growth//views/dashboard-notices.php' for inclusion (include_path='.:/usr/share/php')

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/adbase-ai-popup-growth/views/dashboard_notices.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/adbase-ai-popup-growth/adbase-ai-modal.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/adbase-ai-popup-growth/views/sidebar.php:9
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/adbase-ai-popup-growth/views/settings.php:2

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 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 18 tag instead of maximum 10
You can look at the official readme.txt

adbase-ai-popup-growth/adbase-ai-modal.php 77% from 13 tests

This is the main PHP file of "SendSquared - Email Marketing, Lead Generation, Popup & Post Emailer" version 1.0.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adbase-ai-popup-growth.php" instead of "adbase-ai-modal.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 149 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin889 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5100151889

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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