73% import-emails-to-gmail-contacts

Code Review | Import emails to Gmail Contacts

WordPress plugin Import emails to Gmail Contacts scored 73% from 54 tests.

About plugin

  • Plugin page: import-emails-to-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.5
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Oct 27, 2016
  • Number of updates: 22
  • Update frequency: every 14.6 days
  • Top authors: mynamevenu24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,027 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.24MB] [CPU: ▼20.48ms] Passed 4 tests

This is a short check of server-side resources used by Import emails to Gmail Contacts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.06 ▼2.45
Dashboard /wp-admin3.06 ▼0.2427.94 ▼22.44
Posts /wp-admin/edit.php3.20 ▼0.1630.75 ▼14.36
Add New Post /wp-admin/post-new.php5.44 ▼0.4569.04 ▼24.03
Media Library /wp-admin/upload.php3.13 ▼0.1027.46 ▼21.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_import_mail_gmail_contacts
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Import emails to Gmail Contacts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲6213.60 ▼0.984.58 ▲2.3348.17 ▼3.65
Dashboard /wp-admin2,225 ▲375.87 ▼0.01110.26 ▼3.8679.96 ▲31.50
Posts /wp-admin/edit.php2,108 ▲222.01 ▼0.0436.68 ▲0.1036.81 ▲2.68
Add New Post /wp-admin/post-new.php1,684 ▲15122.68 ▼0.38692.19 ▲17.6550.38 ▼6.84
Media Library /wp-admin/upload.php1,410 ▲254.21 ▲0.04105.28 ▲2.8248.36 ▲5.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_import_mail_gmail_contacts
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
The following issues need your attention
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined property: stdClass::$access_token in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 52
    • > PHP Notice
      Undefined index: secert_id in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 4
    • > PHP Notice
      Undefined index: cleint_id in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 3
    • > PHP Warning
      SimpleXMLElement::__construct(): ^ in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 65
    • > PHP Warning
      SimpleXMLElement::__construct(): { in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 65
    • > PHP Warning
      SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 65
    • > PHP Notice
      Undefined index: redirect_url in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 5
    • > PHP Fatal error
      Uncaught Exception: String could not be parsed as XML in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php:65
    • > PHP Notice
      Undefined index: code in wp-content/plugins/import-emails-to-gmail-contacts/apiconnect.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/import-emails-to-gmail-contacts/import_email_to_gmail_contacts.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
  • Screenshots: Screenshot #1 (See the Plugin in Action) image required
The official readme.txt is a good inspiration

import-emails-to-gmail-contacts/import_email_to_gmail_contacts.php 92% from 13 tests

"Import emails to Gmail Contacts" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("import-emails-to-gmail-contacts.php" instead of "import_email_to_gmail_contacts.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
There were no executable files found in this plugin516 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP312256306
CSS1412158
JavaScript221452

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
css/logo.png0.72KB0.66KB▼ 8.82%