77% popupally

Code Review | PopupAlly

WordPress plugin PopupAlly scored77%from 54 tests.

About plugin

  • Plugin page: popupally
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: Jan 16, 2023
  • Number of updates: 122
  • Update frequency: every 26.4 days
  • Top authors: rli (96.72%)accessally (4.1%)

Code review

54 tests

User reviews

76 reviews

Install metrics

5,000+ active /349,393 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.28ms] Passed 4 tests

Server-side resources used by PopupAlly
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1645.25 ▲1.32
Dashboard /wp-admin3.42 ▲0.1146.85 ▼2.86
Posts /wp-admin/edit.php3.47 ▲0.1147.47 ▼3.48
Add New Post /wp-admin/post-new.php5.96 ▲0.0895.73 ▲3.90
Media Library /wp-admin/upload.php3.28 ▲0.0537.98 ▲4.33

Server storage [IO: ▲1.13MB] [DB: ▲0.01MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • You have illegally modified 3 files (27.68KB) outside of "wp-content/plugins/popupally/" and "wp-content/uploads/"
    • (new file) wp-content/popupally-scripts/1-popupally-thank-you-1.js
    • (new file) wp-content/popupally-scripts/1-popupally-style.css
    • (new file) wp-content/popupally-scripts/1-popupally-thank-you-2.js
Filesystem: 92 new files
Database: no new tables, 10 new options
New WordPress options
_popupally_setting_num_style_saved
widget_theysaidso_widget
theysaidso_admin_options
_popupally_database_version
_popupally_setting_code
widget_recent-comments
widget_recent-posts
db_upgraded
_popupally_setting_advanced
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for PopupAlly
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲13713.66 ▼0.924.64 ▲2.5741.31 ▼2.14
Dashboard /wp-admin2,218 ▲305.85 ▲0.94103.68 ▼14.1183.12 ▲37.99
Posts /wp-admin/edit.php2,107 ▲152.00 ▼0.0539.14 ▼1.4633.49 ▼2.56
Add New Post /wp-admin/post-new.php6,482 ▲4,96320.19 ▼3.06997.73 ▲314.3564.39 ▲14.66
Media Library /wp-admin/upload.php1,406 ▲244.12 ▼0.0896.26 ▼3.3868.67 ▲25.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • _popupally_database_version
    • _popupally_setting_advanced
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • _popupally_setting_num_style_saved
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 24× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/popupally/resource/template/default/frontend/default-popup.php
    • > /wp-content/plugins/popupally/resource/backend/display/setting-display-post-selection-template.php
    • > /wp-content/plugins/popupally/resource/template/default/frontend/default-embedded.php
    • > /wp-content/plugins/popupally/resource/template/setting-style-submit-customization.php
    • > /wp-content/plugins/popupally/resource/template/default/backend/default-640-preview-template.php
    • > /wp-content/plugins/popupally/resource/template/default/backend/default-preview.php
    • > /wp-content/plugins/popupally/resource/template/clean/backend/clean-preview.php
    • > /wp-content/plugins/popupally/resource/backend/display/setting-display-popup-template.php
    • > /wp-content/plugins/popupally/resource/frontend/disable.php
    • > /wp-content/plugins/popupally/resource/backend/post-display.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PopupAllyTemplate' not found in wp-content/plugins/popupally/resource/template/default/definition.php:3
    • > PHP Notice
      Undefined variable: advanced in wp-content/plugins/popupally/resource/backend/advanced-settings/setting-advanced-display.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/popupally/resource/backend/advanced-settings/setting-advanced-display.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'PopupAllyTemplate' not found in wp-content/plugins/popupally/resource/template/clean/definition.php:3
    • > PHP Notice
      Undefined variable: to_show in wp-content/plugins/popupally/resource/backend/post-display.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'PopupAlly' not found in wp-content/plugins/popupally/resource/backend/setting-toolkit.php:9
    • > PHP Notice
      Undefined variable: advanced in wp-content/plugins/popupally/resource/backend/advanced-settings/setting-advanced-display.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/popupally/resource/backend/advanced-settings/setting-advanced-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/popupally/popup-ally.php:39
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/popupally/resource/backend/post-display.php on line 10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === popupally === )
  • Tags: Please delete some tags, you are using 73 tag instead of maximum 10
You can take inspiration from this readme.txt

popupally/popup-ally.php 85% from 13 tests

"PopupAlly" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("popupally.php" instead of "popup-ally.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 390 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 detected8,020 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP37277583,688
CSS56112,193
JavaScript6171562,139

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity33.10
▷ Minimum class complexity3.00
▷ Maximum class complexity109.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods142
▷ Static methods11379.58%
▷ Public methods10171.13%
▷ Protected methods42.82%
▷ Private methods3726.06%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16.25%
▷ Class constants1593.75%
▷ Public constants15100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
39 PNG files occupy 0.64MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resource/backend/img/warning-icon.png0.66KB0.64KB▼ 3.70%
resource/backend/img/toolbox-icon.png15.87KB0.72KB▼ 95.45%
resource/backend/img/popupally-icon.png1.26KB0.31KB▼ 75.43%
screenshot-4.png109.33KB34.06KB▼ 68.84%
resource/backend/img/toolkit/accessally-icon.png3.94KB2.32KB▼ 41.09%