62% simple-constant-contact

Code Review | Simple Constant Contact

WordPress plugin Simple Constant Contact scored62%from 54 tests.

About plugin

  • Plugin page: simple-constant-c...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4.2
  • WordPress version: 6.3.1
  • First release: Sep 16, 2014
  • Latest release: Apr 10, 2016
  • Number of updates: 7
  • Update frequency: every 82.0 days
  • Top authors: ashtonpaul (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /2,467 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.95MB] [CPU: ▼34.77ms] Passed 4 tests

This is a short check of server-side resources used by Simple Constant Contact
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.86 ▼2.33
Dashboard /wp-admin3.00 ▼0.3120.10 ▼30.60
Posts /wp-admin/edit.php3.00 ▼0.3628.06 ▼26.38
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.54 ▼69.91
Media Library /wp-admin/upload.php3.00 ▼0.2323.41 ▼12.17
Simple Constant Contact /wp-admin/options-general.php?page=simple-cc-plugin3.0022.50

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 52 new files
Database: no new tables, 9 new options
New WordPress options
simpleCC_redirect
widget_theysaidso_widget
db_upgraded
widget_recent-posts
simpleCC_secret
theysaidso_admin_options
simpleCC_apikey
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Simple Constant Contact: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.10 ▼0.511.85 ▲0.0142.17 ▼1.28
Dashboard /wp-admin2,202 ▲255.62 ▲0.0093.68 ▼5.6343.58 ▼2.03
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0139.71 ▲2.2034.97 ▼1.95
Add New Post /wp-admin/post-new.php1,540 ▲918.09 ▼5.18622.98 ▲10.7566.22 ▲16.42
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.03104.06 ▼2.6942.02 ▼4.16
Simple Constant Contact /wp-admin/options-general.php?page=simple-cc-plugin8921.9922.7729.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/simple-constant-contact/simple_constant_contact.php+197
    Undefined index: simpleCC_submit
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-cc-plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-constant-contact/simple_constant_contact.php
  • 34× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Services/CampaignScheduleService.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Services/ListService.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Components/Tracking/OpenActivity.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Services/ActivityService.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Components/Tracking/SendActivity.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Services/EmailMarketingService.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Services\\BaseService' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Services/ContactTrackingService.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Components/Contacts/CustomField.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Components/Tracking/TrackingSummary.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Ctct\\Components\\Component' not found in wp-content/plugins/simple-constant-contact/src/Ctct/Components/Activities/ExportContacts.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: contact, constant contact, signup, plugin, sign-up...

simple-constant-contact/simple_constant_contact.php 92% from 13 tests

The entry point to "Simple Constant Contact" version 1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-constant-contact.php" instead of "simple_constant_contact.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,506 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP505521,9262,489
JavaScript11317

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.14
Average class complexity4.06
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces11
Interfaces2
Traits0
Classes47
▷ Abstract classes24.26%
▷ Concrete classes4595.74%
▷ Final classes00.00%
Methods204
▷ Static methods2914.22%
▷ Public methods19495.10%
▷ Protected methods20.98%
▷ Private methods83.92%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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