84% cf7-servicenow-incidents

Code Review | Contact Form 7: ServiceNow Incidents integration

WordPress plugin Contact Form 7: ServiceNow Incidents integration scored84%from 54 tests.

About plugin

  • Plugin page: cf7-servicenow-in...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2016
  • Latest release: Oct 1, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: jcornutt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /799 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.01MB] [CPU: ▼5.44ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7: ServiceNow Incidents integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.33 ▼0.82
Dashboard /wp-admin3.31 ▲0.0151.90 ▼2.24
Posts /wp-admin/edit.php3.37 ▲0.0148.70 ▼1.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.47 ▼15.89
Media Library /wp-admin/upload.php3.24 ▲0.0136.19 ▼2.37
Contact Form 7: ServiceNow Incidents /wp-admin/options-general.php?page=cf7_servicenow_incidents_options3.2033.90

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7: ServiceNow Incidents integration
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.79 ▼0.738.65 ▲6.8541.60 ▼0.07
Dashboard /wp-admin2,202 ▲255.54 ▼0.0389.45 ▼1.9439.42 ▼5.31
Posts /wp-admin/edit.php2,110 ▲71.96 ▼0.0735.44 ▼2.4337.18 ▼1.92
Add New Post /wp-admin/post-new.php1,535 ▲922.98 ▼0.76672.93 ▲37.4359.49 ▼0.08
Media Library /wp-admin/upload.php1,407 ▲44.22 ▲0.01103.43 ▲2.6446.80 ▼0.29
Contact Form 7: ServiceNow Incidents /wp-admin/options-general.php?page=cf7_servicenow_incidents_options9431.9924.0431.95

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-servicenow-incidents/admin-menu.php:149
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cf7-servicenow-incidents/cf7-servicenow-incidents.php:19

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

cf7-servicenow-incidents/cf7-servicenow-incidents.php Passed 13 tests

The principal PHP file in "Contact Form 7: ServiceNow Incidents integration" v. 0.0.1 is loaded by WordPress automatically on each request
63 characters long description:
ServiceNow incident report integration for Contact Form 7 forms

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
Success! There were no dangerous files found in this plugin280 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32866280

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin