62% aspl-contact-form

Code Review | ASPL Contact Form

WordPress plugin ASPL Contact Form scored62%from 54 tests.

About plugin

  • Plugin page: aspl-contact-form
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2020
  • Latest release: Jul 10, 2020
  • Number of updates: 6
  • Update frequency: every 1.2 days
  • Top authors: acespritech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /529 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.43ms] Passed 4 tests

A check of server-side resources used by ASPL Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.30 ▼1.38
Dashboard /wp-admin3.32 ▲0.0255.71 ▲6.41
Posts /wp-admin/edit.php3.37 ▲0.0151.76 ▲3.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.13 ▼13.56
Media Library /wp-admin/upload.php3.24 ▲0.0139.67 ▲1.89
Contact /wp-admin/admin.php?page=aspl_contact_form3.2737.81
New /wp-admin/admin.php?page=aspl_contact_form_add3.3235.21

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

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

Browser metrics Passed 4 tests

ASPL Contact Form: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16313.44 ▼0.917.77 ▲6.0336.96 ▼4.75
Dashboard /wp-admin2,219 ▲425.52 ▼0.0182.95 ▼11.9240.57 ▼4.31
Posts /wp-admin/edit.php2,127 ▲302.01 ▼0.1538.07 ▲0.0137.44 ▼0.10
Add New Post /wp-admin/post-new.php1,549 ▲2323.31 ▲0.13687.35 ▲23.8754.26 ▼2.27
Media Library /wp-admin/upload.php1,427 ▲274.15 ▼0.0698.54 ▼1.2342.60 ▼3.44
Contact /wp-admin/admin.php?page=aspl_contact_form1,0372.0726.8626.76
New /wp-admin/admin.php?page=aspl_contact_form_add1,1162.0627.0849.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
  • Zombie tables detected upon uninstall: 1 table
    • wp_aspl_cf_form_data
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% 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)
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/aspl-contact-form/include/setting.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/aspl-contact-form/index.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aspl_contact_form_add
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).sortable is not a function" "TypeError: $(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/aspl-contact-form/js/aspl_cf_custom_admin_js.js?ver=6.3.1:46:42)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=aspl_contact_form_add
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).sortable is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: contact form, contact, form, aspl

aspl-contact-form/index.php 77% from 13 tests

The principal PHP file in "ASPL Contact Form" v. 1.1.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aspl-contact-form.php" instead of "index.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin1,071 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP521750848
CSS2269163
JavaScript228860

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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