84% contact-form-sort-code-selection

Code Review | Contact Form Sortcode Selection

WordPress plugin Contact Form Sortcode Selection scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-sort...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.3
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Nov 13, 2017
  • Number of updates: 17
  • Update frequency: every 51.9 days
  • Top authors: commercepundit (88.24%)instals (17.65%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /1,742 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.71ms] Passed 4 tests

Server-side resources used by Contact Form Sortcode Selection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.24 ▼9.54
Dashboard /wp-admin3.31 ▲0.0147.77 ▼4.54
Posts /wp-admin/edit.php3.37 ▲0.0146.06 ▼1.86
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.86 ▼6.88
Media Library /wp-admin/upload.php3.24 ▲0.0137.50 ▲0.59

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form Sortcode Selection
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.351.87 ▼0.0440.41 ▼4.55
Dashboard /wp-admin2,195 ▲185.62 ▲0.0289.77 ▲3.5040.44 ▼6.77
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0635.38 ▲0.8634.46 ▼3.94
Add New Post /wp-admin/post-new.php1,533 ▼223.22 ▲5.04653.87 ▲25.1655.49 ▼9.44
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.10100.23 ▼3.4146.68 ▼0.73

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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 fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/contact-form-sort-code-selection/contact-form-sort-code-selection.php:16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-form-sort-code-selection/contact-form-sort-code-selection.php on line 15
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/contact-form-sort-code-selection/contact-form-sort-code-selection.php on line 15
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/contact-form-sort-code-selection/contact-form-sort-code-selection.php on line 15

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
1 plugin tags: contact form

contact-form-sort-code-selection/contact-form-sort-code-selection.php Passed 13 tests

"Contact Form Sortcode Selection" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
113 characters long description:
Simple WordPress Contact Form selection so sort code will be added on post and page , dependent on contact form 7

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
Success! There were no dangerous files found in this plugin64 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1161345
JavaScript110119

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin