89% wpb-popup-for-contact-form-7

Code Review | WPB Popup for Contact Form 7 – Showing The Contact Form 7 Popup on Button Click - CF7 Popup

WordPress plugin WPB Popup for Contact Form 7 – Showing The Contact Form 7 Popup on Button Click - CF7 Popup scored89%from 54 tests.

About plugin

  • Plugin page: wpb-popup-for-con...
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2021
  • Latest release: Nov 27, 2023
  • Number of updates: 56
  • Update frequency: every 17.6 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

5,000+ active /39,806 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼7.70ms] Passed 4 tests

Analyzing server-side resources used by WPB Popup for Contact Form 7 – Showing The Contact Form 7 Popup on Button Click - CF7 Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1135.70 ▼7.26
Dashboard /wp-admin3.54 ▲0.1950.51 ▼13.76
Posts /wp-admin/edit.php3.65 ▲0.2951.11 ▲3.63
Add New Post /wp-admin/post-new.php6.12 ▲0.2292.53 ▼13.21
Media Library /wp-admin/upload.php3.46 ▲0.2336.82 ▲3.45
Popup /wp-admin/admin.php?page=wpb-popup-for-cf73.4738.87

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 11 new options
New WordPress options
widget_theysaidso_widget
wpb_pcf_installed
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
wpb_pcf_form_settings
wpb_pcf_lite_version
wpb_pcf_popup_settings
wpb_pcf_btn_settings
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by WPB Popup for Contact Form 7 – Showing The Contact Form 7 Popup on Button Click - CF7 Popup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲22213.49 ▼0.6610.65 ▲8.9940.03 ▼3.43
Dashboard /wp-admin2,247 ▲665.66 ▼0.0495.33 ▼17.5553.57 ▲9.25
Posts /wp-admin/edit.php2,153 ▲562.13 ▲0.1541.01 ▲5.7845.66 ▲6.90
Add New Post /wp-admin/post-new.php1,563 ▲3723.32 ▲0.31625.57 ▲12.9169.10 ▲16.85
Media Library /wp-admin/upload.php1,446 ▲464.19 ▼0.0197.02 ▲4.1845.16 ▲1.98
Popup /wp-admin/admin.php?page=wpb-popup-for-cf71,8763.8890.1847.85

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
The following items require your attention
  • The uninstall procedure has failed, leaving 11 options in the database
    • wpb_pcf_form_settings
    • wpb_pcf_lite_version
    • wpb_pcf_installed
    • wpb_pcf_popup_settings
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • wpb_pcf_btn_settings
    • db_upgraded
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can look at the official readme.txt

wpb-popup-for-contact-form-7/main.php 85% from 13 tests

The main PHP script in "WPB Popup for Contact Form 7 – Showing The Contact Form 7 Popup on Button Click - CF7 Popup" version 1.5.9 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpb-popup-for-contact-form-7.php" instead of "main.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,920 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP103274201,106
CSS3710573
JavaScript34565181
SVG11360

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity14.56
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods72
▷ Static methods34.17%
▷ Public methods7097.22%
▷ Protected methods22.78%
▷ Private methods00.00%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin