77% sliding-enquiry-form

Code Review | Sliding Enquiry Form

WordPress plugin Sliding Enquiry Form scored77%from 54 tests.

About plugin

  • Plugin page: sliding-enquiry-form
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: Mar 18, 2018
  • Number of updates: 26
  • Update frequency: every 39.7 days
  • Top authors: adam loyer (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /11,136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.67ms] Passed 4 tests

A check of server-side resources used by Sliding Enquiry Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.88 ▼2.32
Dashboard /wp-admin3.42 ▲0.1154.14 ▲7.55
Posts /wp-admin/edit.php3.53 ▲0.1752.30 ▲1.92
Add New Post /wp-admin/post-new.php6.00 ▲0.1183.69 ▼19.83
Media Library /wp-admin/upload.php3.34 ▲0.1138.23 ▲1.56
Sliding Enquiry /wp-admin/options-general.php?page=sliding_enquiry3.3438.66

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Sliding Enquiry Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.45 ▲0.071.84 ▲0.0438.40 ▼3.37
Dashboard /wp-admin2,213 ▲254.88 ▲0.00100.60 ▲0.1038.67 ▼4.58
Posts /wp-admin/edit.php2,093 ▲12.00 ▲0.0139.18 ▼3.1136.22 ▲0.28
Add New Post /wp-admin/post-new.php1,554 ▲3318.47 ▼4.66599.33 ▼60.9950.53 ▼6.88
Media Library /wp-admin/upload.php1,386 ▲14.22 ▲0.0295.70 ▼11.7943.82 ▼1.47
Sliding Enquiry /wp-admin/options-general.php?page=sliding_enquiry1,1973.2954.9726.14

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sliding-enquiry-form/mail.php
    • > /wp-content/plugins/sliding-enquiry-form/captha/Termcondition.php
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined method CaptchaSecurityImages::generateCode() in wp-content/plugins/sliding-enquiry-form/captha/CaptchaSecurityImages.php:43
    • > PHP Notice
      Undefined index: message in wp-content/plugins/sliding-enquiry-form/mail.php on line 9
    • > PHP Notice
      Undefined index: serveremailid in wp-content/plugins/sliding-enquiry-form/mail.php on line 4
    • > PHP Notice
      Undefined index: captcha in wp-content/plugins/sliding-enquiry-form/mail.php on line 10
    • > PHP Notice
      Undefined index: number in wp-content/plugins/sliding-enquiry-form/mail.php on line 8
    • > PHP Notice
      Undefined index: name in wp-content/plugins/sliding-enquiry-form/mail.php on line 6
    • > PHP Notice
      Undefined index: code in wp-content/plugins/sliding-enquiry-form/captha/CaptchaSecurityImages.php on line 80
    • > PHP Notice
      Undefined index: email in wp-content/plugins/sliding-enquiry-form/mail.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in sliding-enquiry-form/assets to your readme.txt
  • Requires at least: The plugin version is formatted incorrectly
Please take inspiration from this readme.txt

sliding-enquiry-form/sticky-popup.php 85% from 13 tests

The main file in "Sliding Enquiry Form" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Name the main plugin file the same as the plugin slug ("sliding-enquiry-form.php" instead of "sticky-popup.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,728 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP5217319918
CSS4156110
JavaScript40329

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity35.00
▷ Minimum class complexity7.00
▷ Maximum class complexity63.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 4.12MB with 2.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500-rtl.png392.85KB179.34KB▼ 54.35%
assets/banner-1544x500.png392.85KB179.34KB▼ 54.35%
assets/banner-772x250.png172.15KB65.93KB▼ 61.70%
assets/banner-772x250-rtl.png172.15KB65.93KB▼ 61.70%
assets/screenshot-3.png739.26KB246.67KB▼ 66.63%