74% lightbox-for-contact-form-7

Code Review | Lightbox for Contact Form 7

WordPress plugin Lightbox for Contact Form 7 scored74%from 54 tests.

About plugin

  • Plugin page: lightbox-for-cont...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2018
  • Latest release: Jun 25, 2018
  • Number of updates: 3
  • Update frequency: every 131.0 days
  • Top authors: shimion (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,633 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.96MB] [CPU: ▼56.04ms] Passed 4 tests

A check of server-side resources used by Lightbox for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.443.87 ▼38.39
Dashboard /wp-admin2.05 ▼1.265.30 ▼47.04
Posts /wp-admin/edit.php2.05 ▼1.315.88 ▼47.75
Add New Post /wp-admin/post-new.php2.05 ▼3.846.87 ▼90.97
Media Library /wp-admin/upload.php2.05 ▼1.186.25 ▼32.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Lightbox for Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.56 ▼0.789.57 ▲7.8445.69 ▼0.74
Dashboard /wp-admin2,204 ▲305.69 ▲0.0893.73 ▲2.0645.19 ▲2.37
Posts /wp-admin/edit.php2,112 ▲92.19 ▲0.0539.97 ▲1.5034.26 ▼4.28
Add New Post /wp-admin/post-new.php1,534 ▼323.08 ▲4.56677.92 ▲55.3955.05 ▼8.01
Media Library /wp-admin/upload.php1,412 ▲124.44 ▲0.2399.52 ▼4.6843.56 ▼1.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fancybox.min handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lightbox-for-contact-form-7/lightbox-for-contact-form-7.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: contact form 7, fancybox, lightbox, lightbox for contact form 7, popup

lightbox-for-contact-form-7/lightbox-for-contact-form-7.php Passed 13 tests

The entry point to "Lightbox for Contact Form 7" version 0.1 is a PHP file that has certain tags in its header comment area
40 characters long description:
Shows Contact Form 7 in a fancy lightbox

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected44 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP1191035
JavaScript21107
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png142.55KB52.38KB▼ 63.26%