77% conditional-popup-creator

Code Review | Conditional Popup creator

WordPress plugin Conditional Popup creator scored 77% from 54 tests.

About plugin

  • Plugin page: conditional-popup...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Sep 8, 2019
  • Latest release: Jul 15, 2020
  • Number of updates: 19
  • Update frequency: every 16.5 days
  • Top authors: mamunur105 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 558 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
Install script ran successfully

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

This is a short check of server-side resources used by Conditional Popup creator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.36 ▼5.39
Dashboard /wp-admin3.33 ▲0.0343.42 ▼5.21
Posts /wp-admin/edit.php3.38 ▲0.0243.92 ▼13.61
Add New Post /wp-admin/post-new.php5.91 ▲0.0298.11 ▼0.48
Media Library /wp-admin/upload.php3.25 ▲0.0236.65 ▲4.69
All Popups /wp-admin/edit.php?post_type=popups_creator3.4146.47
Add New /wp-admin/post-new.php?post_type=popups_creator3.2137.01

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

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

Browser metrics Passed 4 tests

Conditional Popup creator: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲18513.89 ▼0.308.56 ▲6.4536.71 ▼14.86
Dashboard /wp-admin2,233 ▲454.87 ▼1.01113.44 ▼0.3440.48 ▼6.69
Posts /wp-admin/edit.php2,119 ▲272.00 ▲0.0142.46 ▲3.0541.54 ▼1.31
Add New Post /wp-admin/post-new.php1,556 ▲2223.06 ▼0.18655.26 ▼19.7565.38 ▲6.59
Media Library /wp-admin/upload.php1,415 ▲244.20 ▼0.05116.09 ▲15.2751.13 ▲8.25
All Popups /wp-admin/edit.php?post_type=popups_creator1,2473.3151.8328.09
Add New /wp-admin/post-new.php?post_type=popups_creator2,2967.76206.3873.16

Uninstaller [IO: ▲0.00MB] [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 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=popups_creator
    • > User notice in wp-includes/functions.php+5905
    Function map_meta_cap was called incorrectly. When checking for the edit_post capability, you must always check it against a specific post. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)

SRP 50% 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/conditional-popup-creator/wp-metabox-constructor-class/demo.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/conditional-popup-creator/init.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

conditional-popup-creator/init.php 77% from 13 tests

The main PHP file in "Conditional Popup creator" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("conditional-popup-creator.php" instead of "init.php")
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin908 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP499117646
CSS3254138
JavaScript3419121
Markdown1103

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity32.50
▷ Minimum class complexity9.00
▷ Maximum class complexity56.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin