84% clever-elements

Code Review | Clever Elements email marketing for WordPress

WordPress plugin Clever Elements email marketing for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: clever-elements
  • Plugin version: 1.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2015
  • Latest release: Nov 13, 2023
  • Number of updates: 74
  • Update frequency: every 40.5 days
  • Top authors: Clever Elements (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,252 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼7.56ms] Passed 4 tests

This is a short check of server-side resources used by Clever Elements email marketing for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.80 ▲1.59
Dashboard /wp-admin3.31 ▲0.0045.44 ▼5.75
Posts /wp-admin/edit.php3.36 ▲0.0044.04 ▼4.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.90 ▼20.27
Media Library /wp-admin/upload.php3.23 ▲0.0035.51 ▲0.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Clever Elements email marketing for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.35 ▼0.001.92 ▲0.2737.35 ▼1.52
Dashboard /wp-admin2,195 ▲215.55 ▼0.1088.66 ▲0.2842.18 ▲1.16
Posts /wp-admin/edit.php2,106 ▲61.96 ▲0.0235.32 ▼1.7837.96 ▲4.45
Add New Post /wp-admin/post-new.php1,433 ▼9322.05 ▼1.43553.20 ▼154.6434.04 ▼20.25
Media Library /wp-admin/upload.php1,403 ▲64.27 ▼0.01111.27 ▲8.7144.18 ▲2.97

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/clever-elements/includes/cl_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clever-elements/includes/frontend.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clever-elements/includes/admin.php:60

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can look at the official readme.txt

clever-elements/cleverelements-wp.php 92% from 13 tests

The primary PHP file in "Clever Elements email marketing for WordPress" version 1.5.6 is used by WordPress to initiate all plugin functionality
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 ("clever-elements.php" instead of "cleverelements-wp.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
Success! There were no dangerous files found in this plugin1,206 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12202301932
JavaScript3659242
CSS25032

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity17.25
▷ Minimum class complexity4.00
▷ Maximum class complexity29.00
Average method complexity2.91
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/ce_icon_36x36.png2.65KB1.24KB▼ 53.34%
public/images/ce_icon_24x24.png2.13KB0.71KB▼ 66.47%
public/images/ce_icon.png24.30KB11.48KB▼ 52.76%