78% aweber-optin-widget

Code Review | Simple Aweber Optin Widget

WordPress plugin Simple Aweber Optin Widget scored78%from 54 tests.

About plugin

  • Plugin page: aweber-optin-widget
  • Plugin version: 1.16
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Jul 24, 2014
  • Latest release: Nov 22, 2016
  • Number of updates: 87
  • Update frequency: every 9.8 days
  • Top authors: absikandar (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /8,502 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼13.01ms] Passed 4 tests

A check of server-side resources used by Simple Aweber Optin Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0844.98 ▲4.06
Dashboard /wp-admin3.38 ▲0.0346.87 ▼19.58
Posts /wp-admin/edit.php3.43 ▲0.0746.77 ▼2.41
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.97 ▼25.86
Media Library /wp-admin/upload.php3.30 ▲0.0734.43 ▼4.20

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Aweber Optin Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲14613.67 ▼0.626.14 ▲4.0543.32 ▲0.08
Dashboard /wp-admin2,215 ▲274.85 ▼0.05113.24 ▼3.8540.87 ▼1.71
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0240.30 ▲3.6436.81 ▲2.77
Add New Post /wp-admin/post-new.php1,547 ▲1423.07 ▼0.11688.48 ▲55.8354.44 ▲7.28
Media Library /wp-admin/upload.php1,397 ▲64.20 ▼0.01100.99 ▼5.5241.46 ▼5.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_twb_aw_widget
    • theysaidso_admin_options

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/aweber-optin-widget/twb_aweber_optin.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/aweber-optin-widget/inc/twb_aweber_widget.php:3

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)
There were no browser issues found


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
Please take inspiration from this readme.txt

aweber-optin-widget/twb_aweber_optin.php 85% from 13 tests

The principal PHP file in "Simple Aweber Optin Widget" v. 1.16 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aweber-optin-widget.php" instead of "twb_aweber_optin.php")
  • Description: The description should be shorter than 140 characters (currently 393 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected576 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/lock.png3.32KB0.90KB▼ 72.95%