78% integrate-aweber-and-contact-form-7

Code Review | Integrate AWeber and Contact Form 7

WordPress plugin Integrate AWeber and Contact Form 7 scored 78% from 54 tests.

About plugin

  • Plugin page: integrate-aweber-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Feb 19, 2020
  • Latest release: Mar 10, 2020
  • Number of updates: 15
  • Update frequency: every 1.3 days
  • Top authors: mrdarpan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 530 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Integrate AWeber and Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.83 ▲1.87
Dashboard /wp-admin3.33 ▲0.0248.99 ▼3.62
Posts /wp-admin/edit.php3.38 ▲0.0247.59 ▲1.81
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.00 ▼0.40
Media Library /wp-admin/upload.php3.25 ▲0.0237.24 ▲0.91

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Integrate AWeber and Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.29 ▼1.084.36 ▲2.1639.08 ▼4.52
Dashboard /wp-admin2,216 ▲315.85 ▲0.9795.18 ▼8.1939.33 ▼3.97
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0339.41 ▲1.7134.90 ▲1.57
Add New Post /wp-admin/post-new.php1,521 ▼717.79 ▼0.47645.98 ▲26.8567.80 ▲18.45
Media Library /wp-admin/upload.php1,392 ▲74.25 ▲0.0498.64 ▼3.4048.79 ▲2.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% 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 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
The following issues need your attention
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/examples/multiple.php
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/examples/session.php
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/examples/get.php
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/examples/cookie.php
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/examples/cookie_jar.php
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/examples/basic-auth.php
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/bin/create_pear_package.php
    • > /wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/examples/post.php
  • 60× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP/409.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/tests/Proxy/HTTP.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP/408.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP/431.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP/501.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP/505.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP/500.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/tests/SSL.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Requests_Exception_HTTP' not found in wp-content/plugins/integrate-aweber-and-contact-form-7/vendor/rmccue/requests/library/Requests/Exception/HTTP/412.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 93% from 29 tests

readme.txt Passed 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
8 plugin tags: contact form 7 extension, cf7 aweber extension, contact form 7 integration, awb, cf7 aweber integration...

integrate-aweber-and-contact-form-7/awb-cf7.php 85% from 13 tests

"Integrate AWeber and Contact Form 7" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("integrate-aweber-and-contact-form-7.php" instead of "awb-cf7.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin7,365 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
PHP1021,3724,1376,162
Markdown113500788
JavaScript21210128
CSS2180102
JSON30084
YAML29548
XML12037
Bourne Shell24012
Python1104

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity9.79
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces1
Interfaces4
Traits0
Classes83
▷ Abstract classes11.20%
▷ Concrete classes8298.80%
▷ Final classes00.00%
Methods433
▷ Static methods7918.24%
▷ Public methods38488.68%
▷ Protected methods439.93%
▷ Private methods61.39%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants27
▷ Global constants311.11%
▷ Class constants2488.89%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/awbc-aweber-icon.png0.75KB0.77KB0.00%
admin/images/awbc-favicon.png1.70KB0.89KB▼ 47.76%