76% popliup

Code Review | Popliup - Wordpress Popup Plugin

WordPress plugin Popliup - Wordpress Popup Plugin scored 76% from 53 tests.

About plugin

  • Plugin page: popliup
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 5.8.1
  • First release: Sep 8, 2015
  • Latest release: May 3, 2016
  • Number of updates: 18
  • Update frequency: every 13.3 days
  • Top authors: Webliup (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

200+ active / 3,409 total downloads

Benchmarks

Plugin footprint Passed 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.37MB] [CPU: ▼262.91ms] Passed 4 tests

Analyzing server-side resources used by Popliup - Wordpress Popup Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.24 ▲0.4042.45 ▲9.70
Dashboard /wp-admin3.46 ▲0.4048.64 ▲7.77
Posts /wp-admin/edit.php3.50 ▲0.4045.61 ▲5.49
Add New Post /wp-admin/post-new.php5.78 ▲0.3594.67 ▼1,061.77
Media Library /wp-admin/upload.php3.34 ▲0.3335.92 ▼3.14
Add New /wp-admin/post-new.php?post_type=popliup3.2734.84
All Popups /wp-admin/edit.php?post_type=popliup3.4434.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Popliup - Wordpress Popup Plugin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,849 ▲24316.88 ▲1.1012.06 ▲4.8946.24 ▼1.26
Dashboard /wp-admin2,988 ▲1387.01 ▲1.14135.34 ▲3.30113.54 ▲16.33
Posts /wp-admin/edit.php2,792 ▲862.99 ▲0.3071.66 ▲1.27112.17 ▲18.10
Add New Post /wp-admin/post-new.php1,913 ▲6016.03 ▼2.92381.23 ▲3.15125.28 ▲18.77
Media Library /wp-admin/upload.php1,849 ▲775.44 ▲0.44131.41 ▼20.71130.72 ▲16.93
Add New /wp-admin/post-new.php?post_type=popliup4,7249.57250.88197.09
All Popups /wp-admin/edit.php?post_type=popliup1,4432.6868.7386.36

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
This plugin's uninstaller ran successfully

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popliup
    • > Notice in wp-content/plugins/popliup/admin/class-popliup-admin.php+514
    Trying to access array offset on value of type null
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=popliup
    • > Warning in wp-content/plugins/popliup/admin/inc/popliup_options_metabox.php+135
    Illegal string offset 'popup_theme'

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 items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/popliup/admin/inc/popliup_contact_support_metabox.php
    • > /wp-content/plugins/popliup/admin/inc/popliup_pro_ver_info_metabox.php
  • 7× 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/popliup/admin/inc/popliup_conditions_metabox.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popliup/themes/default/default.php:13
    • > PHP Warning
      require_once(POPLI_INC_DIRclass-mobile-detect.php): failed to open stream: No such file or directory in wp-content/plugins/popliup/includes/display-rules/class-popliup-rule-device.php on line 9
    • > PHP Warning
      Use of undefined constant POPLI_INC_DIR - assumed 'POPLI_INC_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/popliup/includes/display-rules/class-popliup-rule-device.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'POPLI_INC_DIRclass-mobile-detect.php' (include_path='.:/usr/share/php') in wp-content/plugins/popliup/includes/display-rules/class-popliup-rule-device.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popliup/themes/minimal/minimal.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/popliup/admin/inc/popliup_options_metabox.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=popliup
    • > Javascript (severe) in unknown
    /wp-content/plugins/popliup/assets/js/popliup-wp-admin.min.js?ver=1.0 5:141 Uncaught TypeError: a(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === popliup === )
The official readme.txt is a good inspiration

popliup/popliup.php 92% from 13 tests

The entry point to "Popliup - Wordpress Popup Plugin" version 1.1.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin2,190 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP227991,3631,735
CSS4422377
HTML14263
JavaScript30815

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity16.19
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods128
▷ Static methods129.38%
▷ Public methods11489.06%
▷ Protected methods21.56%
▷ Private methods129.38%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants1052.63%
▷ Class constants947.37%
▷ Public constants9100.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/popliup_ico.png1.21KB0.29KB▼ 75.69%