94% acymailing-custom-headers

Code Review | Custom headers - AcyMailing

WordPress plugin Custom headers - AcyMailing scored 94% from 54 tests.

About plugin

  • Plugin page: acymailing-custom...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9.2
  • WordPress version: 5.9.2
  • First release: May 24, 2021
  • Latest release: Mar 21, 2022
  • Number of updates: 4
  • Update frequency: every 75.8 days
  • Top authors: acyba (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 232 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Custom headers - AcyMailing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0254.21 ▼0.92
Dashboard /wp-admin3.42 ▲0.0132.27 ▲0.41
Posts /wp-admin/edit.php3.65 ▲0.0135.85 ▼3.10
Add New Post /wp-admin/post-new.php6.91 ▼0.0888.53 ▼1,200.57
Media Library /wp-admin/upload.php3.30 ▲0.0123.62 ▼1.45

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Custom headers - AcyMailing: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,767 ▲1316.15 ▲0.585.69 ▼1.422.21 ▼0.09
Dashboard /wp-admin2,895 ▲376.10 ▼0.08112.46 ▼20.98152.53 ▼6.15
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0063.32 ▲1.27139.07 ▼1.93
Add New Post /wp-admin/post-new.php1,661 ▼9116.95 ▼4.89390.11 ▼60.83151.82 ▼5.33
Media Library /wp-admin/upload.php1,698 ▲35.46 ▼0.08140.04 ▲0.83188.47 ▼3.71

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/acymailing-custom-headers/acymailing-customheaders.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'AcyMailing\\Libraries\\acymPlugin' not found in wp-content/plugins/acymailing-custom-headers/plugin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: acymailing, headers, newsletter

acymailing-custom-headers/acymailing-customheaders.php 92% from 13 tests

The entry point to "Custom headers - AcyMailing" version 1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("acymailing-custom-headers.php" instead of "acymailing-customheaders.php")

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
Good job! No executable or dangerous file extensions detected63 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP213863

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner.png14.78KB5.10KB▼ 65.51%