66% pinq-inquiry-management-solution

Code Review | PINQ - Inquiry Management solution with Contact Us page

WordPress plugin PINQ - Inquiry Management solution with Contact Us page scored 66% from 54 tests.

About plugin

  • Plugin page: pinq-inquiry-mana...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2017
  • Latest release: Oct 12, 2018
  • Number of updates: 59
  • Update frequency: every 9.1 days
  • Top authors: piclaunch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 833 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.09MB] [CPU: ▼1.89ms] Passed 4 tests

This is a short check of server-side resources used by PINQ - Inquiry Management solution with Contact Us page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.79 ▲0.30
Dashboard /wp-admin3.39 ▲0.0953.92 ▲7.81
Posts /wp-admin/edit.php3.50 ▲0.1548.89 ▲1.76
Add New Post /wp-admin/post-new.php5.99 ▲0.1087.87 ▼12.36
Media Library /wp-admin/upload.php3.31 ▲0.0937.37 ▲2.76
PINQ Inquiry Management /wp-admin/options-general.php?page=picalunchpinq3.3432.51

Server storage [IO: ▲1.15MB] [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: 26 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for PINQ - Inquiry Management solution with Contact Us page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲19813.64 ▼0.6611.02 ▲9.0881.40 ▲38.01
Dashboard /wp-admin2,214 ▲265.79 ▼0.2799.34 ▼8.6637.49 ▼3.84
Posts /wp-admin/edit.php2,094 ▲52.00 ▼0.0135.78 ▼2.2630.80 ▼1.26
Add New Post /wp-admin/post-new.php1,521 ▼1223.03 ▲0.09591.17 ▼3.5870.56 ▲3.08
Media Library /wp-admin/upload.php1,396 ▲144.21 ▲0.0798.72 ▼8.3941.21 ▼3.47
PINQ Inquiry Management /wp-admin/options-general.php?page=picalunchpinq5,71949.281,368.53167.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=picalunchpinq
    • > Notice in wp-content/plugins/pinq-inquiry-management-solution/admin/partials/picalunchpinq-admin-display.php+42
    Trying to access array offset on value of type bool

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pinq-inquiry-management-solution/public/partials/picalunchpinq-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/pinq-inquiry-management-solution/admin/partials/picalunchpinq-admin-display.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=picalunchpinq
    • > Network (severe)
    http://piclaunch.com/i/i2/f.php?sid=14 - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/options-general.php?page=picalunchpinq
    • > Javascript (severe) in unknown
    http://piclaunch.com/pinq/ 406 Access to XMLHttpRequest at 'https://freegeoip.net/json/' from origin 'http://piclaunch.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/options-general.php?page=picalunchpinq
    • > Console-api (severe) in unknown
    http://piclaunch.com/i/i2/embed.js 113:11 Object
    • > GET request to /wp-admin/options-general.php?page=picalunchpinq
    • > Network (severe)
    https://freegeoip.net/json/ - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/options-general.php?page=picalunchpinq
    • > Network (severe)
    http://piclaunch.com/i/i2/form.php?section= - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
9 plugin tags: inquiry reporting, contact geolocation, contact us page, contact us free, wordpress contact us...

pinq-inquiry-management-solution/picalunchpinq.php 85% from 13 tests

"PINQ - Inquiry Management solution with Contact Us page" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pinq-inquiry-management-solution.php" instead of "picalunchpinq.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin535 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12274604529
JavaScript24546
CSS2080

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.23
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods26.06%
▷ Public methods2884.85%
▷ Protected methods00.00%
▷ Private methods515.15%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 1.08MB with 0.65MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png793.38KB329.66KB▼ 58.45%
screenshot2.png311.03KB117.36KB▼ 62.27%