89% woo-email-control

Code Review | Woo Email Control

WordPress plugin Woo Email Control scored89%from 54 tests.

About plugin

  • Plugin page: woo-email-control
  • Plugin version: 1.061
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5
  • WordPress version: 6.3.1
  • First release: Jul 2, 2016
  • Latest release: Aug 8, 2016
  • Number of updates: 22
  • Update frequency: every 1.7 days
  • Top authors: findshorty (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /6,872 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.15ms] Passed 4 tests

An overview of server-side resources used by Woo Email Control
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.12 ▲2.16
Dashboard /wp-admin3.31 ▼0.0450.30 ▼14.66
Posts /wp-admin/edit.php3.36 ▲0.0048.76 ▼0.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.36 ▼17.36
Media Library /wp-admin/upload.php3.23 ▲0.0035.51 ▼0.34

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woo Email Control
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲2814.32 ▼0.401.94 ▼0.9544.38 ▲0.82
Dashboard /wp-admin2,195 ▲185.61 ▼0.1596.74 ▲5.2544.40 ▲1.87
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.1035.59 ▼4.0935.61 ▲0.67
Add New Post /wp-admin/post-new.php1,526 ▼123.18 ▼0.07670.50 ▼51.5959.49 ▼6.86
Media Library /wp-admin/upload.php1,403 ▲64.10 ▼0.05109.23 ▼2.7448.38 ▼0.60

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 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 Passed 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 SRP test was a success

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 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === woo-email-control === )
You can take inspiration from this readme.txt

woo-email-control/woo-email-control.php 92% from 13 tests

The main PHP file in "Woo Email Control" ver. 1.061 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected657 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP212697627
JavaScript112026
CSS1014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity83.00
▷ Minimum class complexity83.00
▷ Maximum class complexity83.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/wooctrl-icon.png2.22KB1.34KB▼ 39.72%
assets/img/wooctrl-icon@2x.png3.69KB1.91KB▼ 48.35%